+" PlanReturnDays = (select datediff(dd, dEndDate, dReturnDate) from tZHCProject p where p.nProjectID = a.nProjectID), LastUpdateTime = a.dLastUpdateTime ,SaleCount = 0 "
+" PlanReturnDays = (select datediff(dd, dEndDate, dReturnDate) from tZHCProject p where p.nProjectID = a.nProjectID), LastUpdateTime = a.dLastUpdateTime ,SaleCount = 0 "
...
@@ -73,9 +79,9 @@ public class ActivityServiceImpl implements ActivityService {
...
@@ -73,9 +79,9 @@ public class ActivityServiceImpl implements ActivityService {
+" WHERE a.nProjectID = ? ";
+" WHERE a.nProjectID = ? ";
Stringsql0="select so.nPlanID, sum(so.nTotalSaleQty) nSaleQty from tSalesOrder so, tZHCPlan p where so.sB2BOrderTypeID = '3' and so.nPlanID = p.nPlanID and p.nProjectID = "+projectId+" group by so.nPlanID";
Stringsql0="select so.nPlanID, sum(so.nTotalSaleQty) nSaleQty from tSalesOrder so, tZHCPlan p where so.sB2BOrderTypeID = '3' and so.nPlanID = p.nPlanID and p.nProjectID = "+projectId+" group by so.nPlanID";
level=jdbcTemplate.queryForInt("select GoodsCategoryLevel = isnull((select Convert(int,sValue1) from tSystemCtrl where sCode = 'GoodsCategoryLevel'),0)");
@Qualifier("readonly")
}
privateJdbcTemplatereadJdbcTemplate;
Stringthree="select sCategoryNO, sCategoryDesc, sUpCategoryNO from tOrgCategory where sOrgNO = ? and nCategoryLevel = ? and nTag&1 = 0 order by nSort desc";
Stringthree="select sCategoryNO, sCategoryDesc, sUpCategoryNO from tOrgCategory where sOrgNO = ? and nCategoryLevel = ? and nTag&1 = 0 order by nSort desc";
Stringthree="select sCategoryNO, sCategoryDesc, sUpCategoryNO from tOrgCategory where sOrgNO = ? and sUpCategoryNO = ? and nTag&1 = 0 order by nSort desc";
Stringthree="select sCategoryNO, sCategoryDesc, sUpCategoryNO from tOrgCategory where sOrgNO = ? and sUpCategoryNO = ? and nTag&1 = 0 order by nSort desc";
Stringsql="select c.*, m.sMobile sSalesmanMobile from tCustomer c left join tSalesman m on m.sSalesmanNO = c.sSalesmanNO1, tB2BUser u where c.sCustNO = u.sCustNO and u.sOpenID = ? and c.nTag&1 = 0 and u.nTag&1 = 0";
Stringsql="select c.*, m.sMobile sSalesmanMobile from tCustomer c left join tSalesman m on m.sSalesmanNO = c.sSalesmanNO1, tB2BUser u where c.sCustNO = u.sCustNO and u.sOpenID = ? and c.nTag&1 = 0 and u.nTag&1 = 0";
List<Map<String,Object>>shopList=jdbcTemplate.queryForList("select s.*, m.sSalesmanName, m.sMobile sSalesmanMobile from tShop s left join tSalesman m on m.sSalesmanNO = s.sSalesmanNO1 where s.sCustNO = ? and s.sOrgNO = ? and s.nTag&1 = 0",custNo,orgNo);
List<Map<String,Object>>shopList=readJdbcTemplate.queryForList("select s.*, m.sSalesmanName, m.sMobile sSalesmanMobile from tShop s left join tSalesman m on m.sSalesmanNO = s.sSalesmanNO1 where s.sCustNO = ? and s.sOrgNO = ? and s.nTag&1 = 0",custNo,orgNo);
returnshopList;
returnshopList;
}
}
...
@@ -763,7 +763,7 @@ public class UserServiceImpl implements UserService {
...
@@ -763,7 +763,7 @@ public class UserServiceImpl implements UserService {
},keyHolder);
},keyHolder);
Objectkey=keyHolder.getKey();
Objectkey=keyHolder.getKey();
jdbcTemplate.update("update tShop set sShopNO = RIGHT('00000000'+ CAST(nShopID as varchar(8)), 8) where nShopID = ?",key);
jdbcTemplate.update("update tShop set sShopNO = RIGHT('00000000'+ CAST(nShopID as varchar(8)), 8) where nShopID = ?",key);
StringsShopNO=jdbcTemplate.queryForString("select sShopNO from tShop where nShopID = ?",key);
StringsShopNO=readJdbcTemplate.queryForString("select sShopNO from tShop where nShopID = ?",key);
map.put("sShopNO",sShopNO);
map.put("sShopNO",sShopNO);
returnmap;
returnmap;
}
}
...
@@ -838,13 +838,13 @@ public class UserServiceImpl implements UserService {
...
@@ -838,13 +838,13 @@ public class UserServiceImpl implements UserService {
+"left join tOrg o on o.sOrgNO = s.sOrgNO "
+"left join tOrg o on o.sOrgNO = s.sOrgNO "
+"where "
+"where "
+"sm.sSalesmanNO = s.sSalesmanNO1 and s.sShopNO = ?";
+"sm.sSalesmanNO = s.sSalesmanNO1 and s.sShopNO = ?";