从远程仓库更新

This commit is contained in:
qiankunpingtai
2019-03-12 16:42:28 +08:00
29 changed files with 4516 additions and 3700 deletions

View File

@@ -106,7 +106,7 @@ public class DepotHeadService {
depotHead.setOperpersonname(uName);
}
depotHead.setCreatetime(new Timestamp(System.currentTimeMillis()));
depotHead.setStatus(false);
depotHead.setStatus(BusinessConstants.BILLS_STATUS_UN_AUDIT);
return depotHeadMapper.insert(depotHead);
}
@@ -142,7 +142,7 @@ public class DepotHeadService {
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
public int batchSetStatus(Boolean status, String depotHeadIDs) {
public int batchSetStatus(String status, String depotHeadIDs) {
List<Long> ids = StringUtil.strToLongList(depotHeadIDs);
DepotHead depotHead = new DepotHead();
depotHead.setStatus(status);
@@ -275,7 +275,7 @@ public class DepotHeadService {
User userInfo=userService.getCurrentUser();
depotHead.setOperpersonname(userInfo==null?null:userInfo.getUsername());
depotHead.setCreatetime(new Timestamp(System.currentTimeMillis()));
depotHead.setStatus(false);
depotHead.setStatus(BusinessConstants.BILLS_STATUS_UN_AUDIT);
depotHeadMapperEx.adddepotHead(depotHead);
/**入库和出库处理预付款信息*/
if(BusinessConstants.PAY_TYPE_PREPAID.equals(depotHead.getPaytype())){
@@ -285,6 +285,14 @@ public class DepotHeadService {
}
/**入库和出库处理单据子表信息*/
depotItemService.saveDetials(inserted,deleted,updated,depotHead.getId());
/**如果关联单据号非空则更新订单的状态为2 */
if(depotHead.getLinknumber()!=null) {
DepotHead depotHeadOrders = new DepotHead();
depotHeadOrders.setStatus(BusinessConstants.BILLS_STATUS_SKIP);
DepotHeadExample example = new DepotHeadExample();
example.createCriteria().andNumberEqualTo(depotHead.getLinknumber());
depotHeadMapper.updateByExampleSelective(depotHeadOrders, example);
}
}
/**
* create by: cjl

View File

@@ -31,13 +31,17 @@ public class SystemConfigComponent implements ICommonQuery {
}
private List<?> getSystemConfigList(Map<String, String> map) {
String search = map.get(Constants.SEARCH);
String companyName = StringUtil.getInfo(search, "companyName");
String order = QueryUtils.order(map);
return systemConfigService.select(QueryUtils.offset(map), QueryUtils.rows(map));
return systemConfigService.select(companyName, QueryUtils.offset(map), QueryUtils.rows(map));
}
@Override
public Long counts(Map<String, String> map) {
return systemConfigService.countSystemConfig();
String search = map.get(Constants.SEARCH);
String companyName = StringUtil.getInfo(search, "companyName");
return systemConfigService.countSystemConfig(companyName);
}
@Override

View File

@@ -33,12 +33,12 @@ public class SystemConfigService {
SystemConfigExample example = new SystemConfigExample();
return systemConfigMapper.selectByExample(example);
}
public List<SystemConfig> select(int offset, int rows) {
return systemConfigMapperEx.selectByConditionSystemConfig(offset, rows);
public List<SystemConfig> select(String companyName, int offset, int rows) {
return systemConfigMapperEx.selectByConditionSystemConfig(companyName, offset, rows);
}
public Long countSystemConfig() {
return systemConfigMapperEx.countsBySystemConfig();
public Long countSystemConfig(String companyName) {
return systemConfigMapperEx.countsBySystemConfig(companyName);
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
@@ -69,7 +69,7 @@ public class SystemConfigService {
public int checkIsNameExist(Long id, String name) {
SystemConfigExample example = new SystemConfigExample();
example.createCriteria().andIdNotEqualTo(id).andNameEqualTo(name);
example.createCriteria().andIdNotEqualTo(id).andCompanyNameEqualTo(name);
List<SystemConfig> list = systemConfigMapper.selectByExample(example);
return list.size();
}