|
@@ -396,7 +396,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
.map(Map.Entry::getKey)
|
|
|
.collect(Collectors.toList());
|
|
|
if (!duplicateBillNumbers.isEmpty()){
|
|
|
- httpRespMsg.setError("[" + contract.getNumber() + "]" + MessageUtils.message("凭证号重复"));
|
|
|
+ httpRespMsg.setError("[" + contract.getNumber() + "]" + MessageUtils.message("other.DuplicateVoucherNumber"));
|
|
|
return httpRespMsg;
|
|
|
}
|
|
|
BigDecimal bg = new BigDecimal("0");
|
|
@@ -496,7 +496,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
.map(Map.Entry::getKey)
|
|
|
.collect(Collectors.toList());
|
|
|
if (!duplicateBillNumbers.isEmpty()){
|
|
|
- httpRespMsg.setError("[" + contract.getNumber() + "]" + MessageUtils.message("凭证号重复"));
|
|
|
+ httpRespMsg.setError("[" + contract.getNumber() + "]" + MessageUtils.message("other.DuplicateVoucherNumber"));
|
|
|
return httpRespMsg;
|
|
|
}
|
|
|
payCustomizedMapper.delete(new QueryWrapper<ContractPayCustomized>().eq("contract_id",contract.getId()));
|
|
@@ -833,7 +833,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
boolean TypeExists = false;
|
|
|
for (int i = 0; i < 30; i++) {
|
|
|
if (row.getCell(i) != null) {
|
|
|
- if (i == 12 || i == 13 || i == 14 || i == 15||i==26) {
|
|
|
+ if (i == 12 || i == 13 || i == 14 || i == 15||i==25) {
|
|
|
//日期类型的
|
|
|
row.getCell(i).setCellType(CellType.NUMERIC);
|
|
|
} else {
|
|
@@ -856,8 +856,15 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
customItem.setCustomerContact(row.getCell(6)==null?null:row.getCell(6).getStringCellValue());
|
|
|
customItem.setCustomerPhone(row.getCell(7)==null?null:row.getCell(7).getStringCellValue());
|
|
|
customItem.setUseDepartment(row.getCell(8)==null?null:row.getCell(8).getStringCellValue());
|
|
|
- String s5 = row.getCell(9) == null ? null : row.getCell(9).getStringCellValue();
|
|
|
- customItem.setFundsSource(s5);
|
|
|
+ String s5 = row.getCell(9) == null ? "" : row.getCell(9).getStringCellValue();
|
|
|
+ if (s5.equals("科研")){
|
|
|
+ customItem.setFundsSource("1");
|
|
|
+ }else if (s5.contains("其他")){
|
|
|
+ customItem.setFundsSource("2");
|
|
|
+ } else {
|
|
|
+ msg.setError("经费来源填写有误");
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
customItem.setUndertaker(row.getCell(10)==null?null:row.getCell(10).getStringCellValue());
|
|
|
customItem.setAgent(row.getCell(11)==null?null:row.getCell(11).getStringCellValue());
|
|
|
if (row.getCell(12)!=null) {
|
|
@@ -928,44 +935,50 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
}
|
|
|
}
|
|
|
String remarks = row.getCell(22)==null?null:row.getCell(22).getStringCellValue();
|
|
|
- customItem.setStampDutyItems(row.getCell(23)==null?null:row.getCell(23).getStringCellValue());
|
|
|
+// customItem.setStampDutyItems(row.getCell(23)==null?null:row.getCell(23).getStringCellValue());
|
|
|
Contract item = new Contract();
|
|
|
//采购方式
|
|
|
- if (row.getCell(24)==null){
|
|
|
+ if (row.getCell(23)==null){
|
|
|
item.setProcurementWay(null);
|
|
|
- }else if (row.getCell(24).getStringCellValue().equals("公开招标")){
|
|
|
+ }else if (row.getCell(23).getStringCellValue().equals("公开招标")){
|
|
|
item.setProcurementWay(0);
|
|
|
- }else if (row.getCell(24).getStringCellValue().equals("邀请招标")){
|
|
|
+ }else if (row.getCell(23).getStringCellValue().equals("邀请招标")){
|
|
|
item.setProcurementWay(1);
|
|
|
- }else if (row.getCell(24).getStringCellValue().equals("询比价")){
|
|
|
+ }else if (row.getCell(23).getStringCellValue().equals("询比价")){
|
|
|
item.setProcurementWay(2);
|
|
|
- }else if (row.getCell(24).getStringCellValue().equals("竞争性谈判")){
|
|
|
+ }else if (row.getCell(23).getStringCellValue().equals("竞争性谈判")){
|
|
|
item.setProcurementWay(3);
|
|
|
- }else if (row.getCell(24).getStringCellValue().equals("单一来源")){
|
|
|
+ }else if (row.getCell(23).getStringCellValue().equals("单一来源")){
|
|
|
item.setProcurementWay(4);
|
|
|
+ }else {
|
|
|
+ msg.setError("第"+(row.getRowNum()+1)+"行,采购方式填写错误");
|
|
|
+ return msg;
|
|
|
}
|
|
|
//印花税缴纳状态
|
|
|
- if (row.getCell(25)==null){
|
|
|
+ if (row.getCell(24)==null){
|
|
|
customItem.setStampDutyStatus(null);
|
|
|
- }else if (row.getCell(25).getStringCellValue().equals("无需缴纳")){
|
|
|
+ }else if (row.getCell(24).getStringCellValue().equals("无需缴纳")){
|
|
|
customItem.setStampDutyStatus(0);
|
|
|
- }else if (row.getCell(25).getStringCellValue().equals("未缴纳")){
|
|
|
+ }else if (row.getCell(24).getStringCellValue().equals("未缴纳")){
|
|
|
customItem.setStampDutyStatus(1);
|
|
|
- }else if (row.getCell(25).getStringCellValue().equals("已缴纳")){
|
|
|
+ }else if (row.getCell(24).getStringCellValue().equals("已缴纳")){
|
|
|
customItem.setStampDutyStatus(2);
|
|
|
- }else if (row.getCell(25).getStringCellValue().equals("部分缴纳")){
|
|
|
+ }else if (row.getCell(24).getStringCellValue().equals("部分缴纳")){
|
|
|
customItem.setStampDutyStatus(3);
|
|
|
+ }else {
|
|
|
+ msg.setError("第"+(row.getRowNum()+1)+"行,印花税缴纳状态填写错误");
|
|
|
+ return msg;
|
|
|
}
|
|
|
- if(customItem.getStampDutyStatus()!=null&&customItem.getStampDutyStatus()<2&&row.getCell(26)!=null){
|
|
|
+ if(customItem.getStampDutyStatus()!=null&&customItem.getStampDutyStatus()<2&&row.getCell(25)!=null){
|
|
|
msg.setError("印花税缴纳状态为无需缴纳或未缴纳状态无需设置印花税缴纳时间");
|
|
|
return msg;
|
|
|
}
|
|
|
//印花税缴纳时间
|
|
|
- if (row.getCell(26)==null){
|
|
|
+ if (row.getCell(25)==null){
|
|
|
customItem.setStampDutyTime(null);
|
|
|
- }else if (row.getCell(26).getCellTypeEnum().equals(CellType.NUMERIC)){
|
|
|
+ }else if (row.getCell(25).getCellTypeEnum().equals(CellType.NUMERIC)){
|
|
|
//日期类型的
|
|
|
- Date cellValue = row.getCell(26).getDateCellValue();
|
|
|
+ Date cellValue = row.getCell(25).getDateCellValue();
|
|
|
LocalDate localDate = cellValue.toInstant() // 转换为Instant
|
|
|
.atZone(ZoneId.systemDefault()) // 转换为ZonedDateTime
|
|
|
.toLocalDate(); // 转换为LocalDate
|
|
@@ -1313,7 +1326,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
headList.add("币种");
|
|
|
headList.add("合同状态(是否结清)");
|
|
|
headList.add("备注");
|
|
|
- headList.add("印花税税目");
|
|
|
+// headList.add("印花税税目");
|
|
|
headList.add("采购方式");
|
|
|
headList.add("印花税缴纳状态");
|
|
|
// headList.add("付款日期");
|
|
@@ -1397,11 +1410,11 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
item.add("");
|
|
|
}
|
|
|
item.add(contract.getRemarks() == null ? "" : contract.getRemarks()+"" );
|
|
|
- if (customData!=null) {
|
|
|
- item.add(customData.getStampDutyItems() == null ? "" : customData.getStampDutyItems());
|
|
|
- }else {
|
|
|
- item.add("");
|
|
|
- }
|
|
|
+// if (customData!=null) {
|
|
|
+// item.add(customData.getStampDutyItems() == null ? "" : customData.getStampDutyItems());
|
|
|
+// }else {
|
|
|
+// item.add("");
|
|
|
+// }
|
|
|
|
|
|
// item.add(payCustomizedList.get(j).getPayDate()==null?"":payCustomizedList.get(j).getPayDate());
|
|
|
//采购方式:0公开招标、1邀请招标、2询比价、3竞争性谈判、4单一来源
|
|
@@ -1443,7 +1456,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
}
|
|
|
else {
|
|
|
ArrayList<String> item = new ArrayList<>();
|
|
|
- for (int i1 = 0; i1 < 26; i1++) {
|
|
|
+ for (int i1 = 0; i1 < 25; i1++) {
|
|
|
item.add("" );
|
|
|
}
|
|
|
|
|
@@ -1523,11 +1536,11 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
item.add("");
|
|
|
}
|
|
|
item.add(contract.getRemarks() == null ? "" : contract.getRemarks()+"" );
|
|
|
- if (customData!=null) {
|
|
|
- item.add(customData.getStampDutyItems() == null ? "" : customData.getStampDutyItems());
|
|
|
- }else {
|
|
|
- item.add("");
|
|
|
- }
|
|
|
+// if (customData!=null) {
|
|
|
+// item.add(customData.getStampDutyItems() == null ? "" : customData.getStampDutyItems());
|
|
|
+// }else {
|
|
|
+// item.add("");
|
|
|
+// }
|
|
|
//采购方式:0公开招标、1邀请招标、2询比价、3竞争性谈判、4单一来源
|
|
|
if (contract.getProcurementWay()==null){
|
|
|
item.add("");
|