Commit dc6238ab authored by Quxl's avatar Quxl

x

parent 8974c0a3
......@@ -520,7 +520,13 @@ public class UserServiceImpl implements UserService {
String salesmanNO1 = (String)parameters.get("salesmanNO1");
String mainBusiness = (String)parameters.get("mainBusiness");
Integer storeCount = (Integer)parameters.get("storeCount");
if(StringUtil.isBlank(salesmanNO1)) {
try {
salesmanNO1 = jdbcTemplate.queryForString("SELECT SalesmanNO = sValue1 FROM tSystemCtrl WHERE sCode = 'DefSalesman'");
} catch (EmptyResultDataAccessException e) {
e.printStackTrace();
}
}
List<Map<String, Object>> addrNameList = jdbcTemplate.queryForList("select sRegionNO, sRegionDesc from tRegion where sRegionNO = ? or sRegionNO = ? or sRegionNO = ?", provinceId, cityId, districtId);
Map<String, Map<String, Object>> addrmm = Util.listToMM(addrNameList, "sRegionNO");
Map<String, Object> pMap = addrmm.get(provinceId);
......@@ -539,9 +545,12 @@ public class UserServiceImpl implements UserService {
jdbcTemplate.update("update tCustomer set nTag = 4 where sCustNO = ? and nTag&2 != 2", custNo);
jdbcTemplate.update("update tShop set sShopName = ?, sMainBusiness = ?, sProvinceID = ?, sCityID = ?, sDistrictID = ?, sProvince = ?, sCity = ?, sDistrict = ?, sAddress = ?, sEmail = ?, sSalesmanNO1 = ? where sShopNO = ?", shopName, mainBusiness, provinceId, cityId, districtId, provinceName, cityName, districtName, address, email, salesmanNO1, shopNo);
List<Map<String, Object>> addrList = jdbcTemplate.queryForList("select * from tCustAddress where sCustNO = ? and sShopNO = ? and nTag&5 = 4", custNo, shopNo);
Integer count = jdbcTemplate.queryForInt("select count(*) from tShopkeeperShop where sShopNO = ? and sSalesmanNO = ?", shopNo, salesmanNO1);
if(count == 0) {
jdbcTemplate.update("insert into tShopkeeperShop (sSalesmanNO, sShopNO, nTag, sCreateUser, dCreateDate, dLastUpdateTime) values (?, ?, 0, ?, getdate(), getdate())", salesmanNO1, shopNo, custNo);
}
List<Map<String, Object>> addrList = jdbcTemplate.queryForList("select * from tCustAddress where sCustNO = ? and sShopNO = ? and nTag&5 = 4", custNo, shopNo);
if(addrList.size() == 0) {
Map<String, Object> addrMap = new HashMap<String, Object>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment