|
@@ -80,6 +80,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
private ContractLogMapper contractLogMapper;
|
|
|
@Resource
|
|
|
private InformationMapper informationMapper;
|
|
|
+ @Resource
|
|
|
+ private SysDictMapper sysDictMapper;
|
|
|
@Value(value = "${upload.path}")
|
|
|
private String path;
|
|
|
@Autowired
|
|
@@ -87,6 +89,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
@Autowired
|
|
|
private ContractPayCustomizedMapper contractPayCustomizedMapper;
|
|
|
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 分页查询合同
|
|
|
* @param request
|
|
@@ -564,7 +568,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
return msg;
|
|
|
}
|
|
|
List<Contract> contractList = contractMapper.selectList(new QueryWrapper<Contract>().eq("company_id", companyId));
|
|
|
- List<ContractType> typeList = contractTypeMapper.selectList(new QueryWrapper<ContractType>().eq("company_id", companyId));
|
|
|
+// List<ContractType> typeList = contractTypeMapper.selectList(new QueryWrapper<ContractType>().eq("company_id", companyId));
|
|
|
+ List<SysDict> sysDictList = sysDictMapper.selectList(new LambdaQueryWrapper<SysDict>().eq(SysDict::getCompanyId, companyId).eq(SysDict::getCode, "ContractType").orderByAsc(SysDict::getSeq));
|
|
|
+
|
|
|
ArrayList<Contract> saveContract = new ArrayList<>();
|
|
|
int dataIndex = 1;
|
|
|
for (int rowIndex = 1; rowIndex <= rowNum; rowIndex++) {
|
|
@@ -591,10 +597,10 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
}
|
|
|
String No = row.getCell(0)==null?null:row.getCell(0).getStringCellValue();
|
|
|
String name = row.getCell(1)==null?null:row.getCell(1).getStringCellValue();
|
|
|
- String startDate = row.getCell(2)==null?null:row.getCell(2).getStringCellValue();
|
|
|
- String endDate = row.getCell(3)==null?null:row.getCell(3).getStringCellValue();
|
|
|
- String amounts = row.getCell(4)==null?null:row.getCell(4).getStringCellValue();
|
|
|
- String type = row.getCell(5)==null?null:row.getCell(5).getStringCellValue();
|
|
|
+ String startDate = row.getCell(4)==null?null:row.getCell(4).getStringCellValue();
|
|
|
+ String endDate = row.getCell(5)==null?null:row.getCell(5).getStringCellValue();
|
|
|
+ String amounts = row.getCell(2)==null?null:row.getCell(2).getStringCellValue();
|
|
|
+ String type = row.getCell(3)==null?null:row.getCell(3).getStringCellValue();
|
|
|
String remarks = row.getCell(6)==null?null:row.getCell(6).getStringCellValue();
|
|
|
Contract item = new Contract();
|
|
|
//检查合同编号是否存在
|
|
@@ -622,8 +628,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
//检查合同类型是否存在
|
|
|
Integer typeId = null;
|
|
|
if (StringUtils.isNotBlank(type)){
|
|
|
- for (ContractType contractType : typeList) {
|
|
|
- if (contractType.getTypeName().equals(type)){
|
|
|
+ for (SysDict contractType : sysDictList) {
|
|
|
+ if (contractType.getName().equals(type)){
|
|
|
TypeExists = true;
|
|
|
typeId = contractType.getId();
|
|
|
break;
|
|
@@ -771,7 +777,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
return msg;
|
|
|
}
|
|
|
List<Contract> contractList = contractMapper.selectList(new QueryWrapper<Contract>().eq("company_id", companyId));
|
|
|
- List<ContractType> typeList = contractTypeMapper.selectList(new QueryWrapper<ContractType>().eq("company_id", companyId));
|
|
|
+// List<ContractType> typeList = contractTypeMapper.selectList(new QueryWrapper<ContractType>().eq("company_id", companyId));
|
|
|
+ List<SysDict> sysDictList = sysDictMapper.selectList(new LambdaQueryWrapper<SysDict>().eq(SysDict::getCompanyId, companyId).eq(SysDict::getCode, "ContractType").orderByAsc(SysDict::getSeq));
|
|
|
+
|
|
|
//获取二级分类列表
|
|
|
List<ContractTypeSec> secTypeList = contractTypeSecMapper.selectList(new QueryWrapper<ContractTypeSec>().eq("company_id", companyId));
|
|
|
ArrayList<Contract> saveContract = new ArrayList<>();
|
|
@@ -914,8 +922,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
//检查合同类型是否存在
|
|
|
Integer typeId = null;
|
|
|
if (StringUtils.isNotBlank(type)){
|
|
|
- for (ContractType contractType : typeList) {
|
|
|
- if (contractType.getTypeName().equals(type)){
|
|
|
+ for (SysDict contractType : sysDictList) {
|
|
|
+ if (contractType.getName().equals(type)){
|
|
|
TypeExists = true;
|
|
|
typeId = contractType.getId();
|
|
|
break;
|