Browse Source

EDI,HR, etc.

wfg 9 months ago
parent
commit
3f9528f0f7

+ 7 - 2
blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/corps/entity/BCorps.java

@@ -445,11 +445,16 @@ public class BCorps implements Serializable {
 	@ApiModelProperty(value = "存在 PS 0=否 1=是")
 	private Integer isPs;
 	/**
-	 * PS(利润分成) 比例
+	 * PS(内部利润分成) 比例
 	 */
-	@ApiModelProperty(value = "PS(利润分成) 比例")
+	@ApiModelProperty(value = "PS(内部利润分成) 比例")
 	private String psRate;
 	/**
+	 * PS(外部利润分成) 比例
+	 */
+	@ApiModelProperty(value = "PS(外部利润分成) 比例")
+	private String psRateExternal;
+	/**
 	 * PS允许付大于收 0=否 1=是
 	 */
 	@ApiModelProperty(value = "PS允许付大于收 0=否 1=是")

+ 42 - 1
blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/staff/entity/StaffInformation.java

@@ -225,7 +225,7 @@ public class StaffInformation implements Serializable {
 	 * 公积金
 	 */
 	@ApiModelProperty(value = "公积金")
-	private BigDecimal providentFund;
+	private String providentFund;
 	/**
 	 * 社保基数等级
 	 */
@@ -356,5 +356,46 @@ public class StaffInformation implements Serializable {
 	@ApiModelProperty(value = "员工照片")
 	private String url;
 
+	/**
+	 * 老系统 Id
+	 */
+	@ApiModelProperty(value = "老系统 Id")
+	private Long oldEmplId;
+
+	/**
+	 * 系统核算部门 id
+	 */
+	@ApiModelProperty(value = "系统核算部门 id")
+	private Long oldAccountingDepartmentId;
+
+	/**
+	 * 系统核算部门 No
+	 */
+	@ApiModelProperty(value = "系统核算部门 No")
+	private String oldAccountingDepartmentNo;
+
+	/**
+	 * 系统核算部门
+	 */
+	@ApiModelProperty(value = "系统核算部门")
+	private String oldAccountingDepartment;
+
+	/**
+	 * 老系统行政部门 id
+	 */
+	@ApiModelProperty(value = "老系统行政部门 id")
+	private Long oldAdministrativeDepartmentId;
+
+	/**
+	 * 老系统行政部门 No
+	 */
+	@ApiModelProperty(value = "老系统行政部门 No")
+	private String oldAdministrativeDepartmentNo;
+
+	/**
+	 * 老系统行政部门
+	 */
+	@ApiModelProperty(value = "老系统行政部门")
+	private String oldAdministrativeDepartment;
 
 }

+ 2 - 2
blade-service/blade-los/src/main/java/org/springblade/los/Util/Regular_INTTRA.java

@@ -932,7 +932,7 @@ public class Regular_INTTRA {
 			Map<String, String> mapString = RegularUtils.regularEn(ediData.getGoodsDesc(),false);
 			if ("200".equals(mapString.get("code"))) {
 				if (RegularUtils.regularLength(mapString.get("susscess"), 512)) {
-					textLength += "货描,";
+//					textLength += "货描,";
 				} else {
 					ediData.setGoodsDesc(mapString.get("susscess"));
 				}
@@ -997,7 +997,7 @@ public class Regular_INTTRA {
 			}
 			//闪点
 			if (ObjectUtils.isNotNull(ediData.getDgFlashPoint())) {
-				ediData.setDgFlashPoint(RegularUtils.formatTempNumber(ediData.getDgFlashPoint() , "F", "闪点", 4));
+				ediData.setDgFlashPoint(RegularUtils.formatTempNumber(ediData.getDgFlashPoint() , "F", "闪点", 3));
 //				// todo
 //				StringBuilder data = new StringBuilder();
 //				boolean status = false;

+ 0 - 1
blade-service/blade-los/src/main/java/org/springblade/los/basic/corps/controller/BCorpsController.java

@@ -342,7 +342,6 @@ public class BCorpsController extends BladeController {
 			}
 		}
 		ExcelUtil.export(response, "往来单位", "往来单位", BeanUtil.copy(bCorpsList, BCorpsExcel.class), BCorpsExcel.class);
-
 	}
 
 	/**

+ 1 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/corps/mapper/CorpsMapper.xml

@@ -82,6 +82,7 @@
         <result column="tax_rate" property="taxRate"/>
         <result column="is_ps" property="isPs"/>
         <result column="ps_rate" property="psRate"/>
+        <result column="ps_rate_external" property="psRateExternal"/>
         <result column="ps_allow_large_credit" property="psAllowLargeCredit"/>
         <result column="details" property="details"/>
         <result column="extended_data" property="extendedData"/>

+ 13 - 4
blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/service/impl/ReportsServiceImpl.java

@@ -135,7 +135,6 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 
 	private final IHmmEdiService hmmEdiService;
 
-
 	@Override
 	public IPage<ReportsVO> selectReportsPage(IPage<ReportsVO> page, ReportsVO reports) {
 		return page.setRecords(baseMapper.selectReportsPage(page, reports));
@@ -1458,6 +1457,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 						item.setProfitSpec(ps_ps.trim() + "\r\n" + ps_spec.trim());
 						item.setText(ps_text);
 						item.setCorpIsDC(corpIsDC);
+						item.setIfDCCorp(corpIsDC==1?"DC":"");
 
 						//   FOverFeeLimit:=Trim(GetSysConst('SEA_ISSUEBILL_OVERFEE_LIMIT', '100000'));
 						// 判断是否国内直客
@@ -1525,7 +1525,12 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 							}
 
 							item.setProfitStatus(profitStatus);
-
+							//[IF([WFPK_ProfitStatus]='Z', 'Profit was zero!',
+							// IF([WFPK_ProfitStatus]='D', 'Profit was unfair and low !',
+							// IF([WFPK_ProfitStatus]='H', 'Profit was high!',
+							// if([WFPK_ProfitStatus]='L','Profit was low!',''))))]
+							//[IF([WFPK_ProfitStatus]='M', 'Profit was minus!',
+							// IF([WFPK_ProfitStatus]='U', 'P/S was unfair!', ''))]
 							switch (profitStatus){
 								case "Z":
 									item.setProfitStatusText("利润为零");
@@ -1539,17 +1544,21 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 									item.setProfitStatusText("利润过高");
 									item.setProfitStatusEnText("Profit was high!");
 									break;
+								case "L":
+									item.setProfitStatusText("利润过低");
+									item.setProfitStatusEnText("Profit was low!");
+									break;
 								case "F":
 									item.setProfitStatusText("利润正常");
 									item.setProfitStatusEnText("");
 									break;
 								case "M":
 									item.setProfitStatusText("利润为负");
-									item.setProfitStatusEnText("");
+									item.setProfitStatusEnText("Profit was minus!");
 									break;
 								case "U":
 									item.setProfitStatusText("不成比例");
-									item.setProfitStatusEnText("");
+									item.setProfitStatusEnText("P/S was unfair!");
 									break;
 								default:
 									item.setProfitStatusText("");

+ 14 - 1
blade-service/blade-los/src/main/java/org/springblade/los/basic/staff/controller/StaffInformationController.java

@@ -187,13 +187,26 @@ public class StaffInformationController extends BladeController {
 	@ApiOperation(value = "删除", notes = "传入ids")
 	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
 		return R.status(bStaffInformationService.removeByIds(Func.toLongList(ids)));
+		// StaffInformation staff = new StaffInformation();
+		// staff
+
+
+		// return R.status(true);
+	}
+
+	/**
+	 * 导出 员工信息
+	 */
+	@GetMapping("/imports")
+	public void imports() {
+
 	}
 
 	/**
 	 * 导出 员工信息
 	 */
 	@GetMapping("/exportStaff")
-	public void exportBPorts(StaffInformation staffInformation, HttpServletResponse response) {
+	public void exportStaff(StaffInformation staffInformation, HttpServletResponse response) {
 		LambdaQueryWrapper<StaffInformation> lambdaQueryWrapper = new LambdaQueryWrapper<>();
 		lambdaQueryWrapper.eq(StaffInformation::getTenantId, AuthUtil.getTenantId())
 			.eq(StaffInformation::getIsDeleted, 0)

+ 7 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/staff/mapper/StaffInformationMapper.xml

@@ -59,6 +59,13 @@
         <result column="home_address" property="homeAddress"/>
         <result column="home_phone" property="homePhone"/>
         <result column="tel" property="tel"/>
+        <result column="old_emplId" property="oldEmplId"/>
+        <result column="old_accounting_department_id" property="oldAccountingDepartmentId"/>
+        <result column="old_accounting_department_no" property="oldAccountingDepartmentNo"/>
+        <result column="old_accounting_department" property="oldAccountingDepartment"/>
+        <result column="old_administrative_department_id" property="oldAdministrativeDepartmentId"/>
+        <result column="old_administrative_department_no" property="oldAdministrativeDepartmentNo"/>
+        <result column="old_administrative_department" property="oldAdministrativeDepartment"/>
     </resultMap>
 
 

+ 96 - 25
blade-service/blade-los/src/main/java/org/springblade/los/edi/service/impl/EDISenderServiceImpl.java

@@ -1218,7 +1218,7 @@ public class EDISenderServiceImpl implements IEDISenderService {
 				count += 1;
 			}
 
-			writer.write("NAD+CA+" + inttraSiDto.getCarrierCode() + ":160:86++" + inttraSiDto.getCarrierName().substring(0, 35) + "'");
+			writer.write("NAD+CA+" + inttraSiDto.getCarrierCode() + ":160:86++" + RegularUtils.copySubstring(inttraSiDto.getCarrierName(), 0, 35) + "'");
 			writer.newLine();
 			count += 1;
 
@@ -1539,24 +1539,24 @@ public class EDISenderServiceImpl implements IEDISenderService {
 					}
 				}
 
-				/* =================1530=================  */
-				if (ObjectUtils.isNotNull(inttraSiDto.getDgRemarks())) {
-					writer.write("FTX+AAC+++" + inttraSiDto.getDgRemarks() + "'");
-					writer.newLine();
-					count += 1;
-				}
-				/* =================1550=================  */
-				if (ObjectUtils.isNotNull(inttraSiDto.getDgContacts())) {
-					writer.write("CTA+HG+:" + inttraSiDto.getDgContacts() + "'");
-					writer.newLine();
-					count += 1;
-				}
-				/* =================1560=================  */
-				if (ObjectUtils.isNotNull(inttraSiDto.getDgTel())) {
-					writer.write("COM+" + inttraSiDto.getDgTel() + "'");
-					writer.newLine();
-					count += 1;
-				}
+//				/* =================1530=================  */
+//				if (ObjectUtils.isNotNull(inttraSiDto.getDgRemarks())) {
+//					writer.write("FTX+AAC+++" + inttraSiDto.getDgRemarks() + "'");
+//					writer.newLine();
+//					count += 1;
+//				}
+//				/* =================1550=================  */
+//				if (ObjectUtils.isNotNull(inttraSiDto.getDgContacts())) {
+//					writer.write("CTA+HG+:" + inttraSiDto.getDgContacts() + "'");
+//					writer.newLine();
+//					count += 1;
+//				}
+//				/* =================1560=================  */
+//				if (ObjectUtils.isNotNull(inttraSiDto.getDgTel())) {
+//					writer.write("COM+" + inttraSiDto.getDgTel() + "'");
+//					writer.newLine();
+//					count += 1;
+//				}
 				if (ObjectUtils.isNotNull(inttraSiDto.getLoadedCntrs())) {
 					List<Map<String, Object>> mapList = inttraSiDto.getLoadedCntrs();
 					for (Map<String, Object> map1 : mapList) {
@@ -1596,7 +1596,7 @@ public class EDISenderServiceImpl implements IEDISenderService {
 						if (ObjectUtils.isNotNull(map1.get("temperature"))) {
 							writer.write("TMP+2+" + map1.get("temperature"));
 							if (ObjectUtils.isNotNull(map1.get("temperatureUnit"))) {
-								writer.write(":" + map1.get("temperatureUnit") + "'");
+								writer.write(":" + ("C".equals(map1.get("temperatureUnit")) ? "CEL" : map1.get("temperatureUnit")) + "'");
 							} else {
 								writer.write(":CEL'");
 							}
@@ -6876,11 +6876,12 @@ public class EDISenderServiceImpl implements IEDISenderService {
 					writer.write("47:" + line);
 				}else{
 					writer.write(":" + line);
-					if(l == (glc - 1)){
-						writer.write("'");
-						writer.newLine();
-						count += 1;
-					}
+				}
+
+				if(l == (glc - 1)){
+					writer.write("'");
+					writer.newLine();
+					count += 1;
 				}
 //				writer.write("47:" + line + "'");
 //				writer.newLine();
@@ -6893,23 +6894,93 @@ public class EDISenderServiceImpl implements IEDISenderService {
 				count += 1;
 				glc += 1;
 			}
+			int lineIdx = 0, lineCount = goodsDescAddtion_S.size();
 			for(String line : goodsDescAddtion_S){
+				if(lineIdx % 5 == 0){
+					if(lineIdx>0){
+						writer.write("'");
+						writer.newLine();
+						glc += 1;
+						count += 1;
+					}
+					writer.write("47:*" + line);
+				}else{
+					writer.write(":" + line);
+				}
+				if(lineIdx == (lineCount - 1)){
+					writer.write("'");
+					writer.newLine();
+					glc += 1;
+					count += 1;
+				}
+				lineIdx += 1;
+
+				/*
 				glc += 1;
 				writer.write("47:" + (glc==1?"*":"*") + line + "'");
 				writer.newLine();
 				count += 1;
+				*/
 			}
+
+			lineIdx = 0;
+			lineCount = goodsDescAddtion_C.size();
 			for(String line : goodsDescAddtion_C){
+				if(lineIdx % 5 == 0){
+					if(lineIdx>0){
+						writer.write("'");
+						writer.newLine();
+						glc += 1;
+						count += 1;
+					}
+					writer.write("47:**" + line);
+				}else{
+					writer.write(":" + line);
+				}
+				if(lineIdx == (lineCount - 1)){
+					writer.write("'");
+					writer.newLine();
+					glc += 1;
+					count += 1;
+				}
+				lineIdx += 1;
+				/*
 				glc += 1;
 				writer.write("47:" + (glc==1?"*":"**") + line + "'");
 				writer.newLine();
 				count += 1;
+
+				 */
 			}
+
+			lineIdx = 0;
+			lineCount = goodsDescAddtion_N.size();
 			for(String line : goodsDescAddtion_N){
+				if(lineIdx % 5 == 0){
+					if(lineIdx>0){
+						writer.write("'");
+						writer.newLine();
+						glc += 1;
+						count += 1;
+					}
+					writer.write("47:***" + line);
+				}else{
+					writer.write(":" + line);
+				}
+				if(lineIdx == (lineCount - 1)){
+					writer.write("'");
+					writer.newLine();
+					glc += 1;
+					count += 1;
+				}
+				lineIdx += 1;
+				/*
 				glc += 1;
 				writer.write("47:" + (glc==1?"*":"***") + line + "'");
 				writer.newLine();
 				count += 1;
+
+				 */
 			}
 
 			if(glc>99){

+ 8 - 2
blade-service/blade-los/src/main/java/org/springblade/los/edi/service/impl/EdiTypesServiceImpl.java

@@ -502,7 +502,13 @@ public class EdiTypesServiceImpl extends ServiceImpl<EdiTypesMapper, EdiTypes> i
 		inttraSoDto.setHsCode(ObjectUtils.isNotNull(details.getHscode()) ? details.getHscode().trim() : "");
 		inttraSoDto.setCargoType(details.getCargoType());
 		if ("danger".equals(details.getCargoType())) {
-			inttraSoDto.setDgImdgCode(details.getDgImdgCode());
+			// dgImdgCode: "8-腐蚀品"
+			String imdg = RegularUtils.forceEmpty(details.getDgImdgCode());
+			int imdgIdx = imdg.indexOf("-");
+			if(imdgIdx>=0){
+				imdg = RegularUtils.copySubstring(imdg, 0, imdgIdx);
+			}
+			inttraSoDto.setDgImdgCode(imdg);
 			inttraSoDto.setDgPageNumber("");
 			inttraSoDto.setDgUnCode(details.getDgUnCode());
 			inttraSoDto.setDgFlashPoint(RegularUtils.forceEmpty(details.getDgFlashPoint()));
@@ -627,7 +633,7 @@ public class EdiTypesServiceImpl extends ServiceImpl<EdiTypesMapper, EdiTypes> i
 				map.put("sealNo", RegularUtils.forceEmpty(item.getSealNo()));
 				map.put("sealUnit", "");
 				map.put("isSoc", item.getIsSoc());
-				PreContainers preContainers = preContainersList.stream().filter(e -> e.getId().toString().equals(item.getCntrTypeCodeId())).findFirst().orElse(null);
+				PreContainers preContainers = preContainersList.stream().filter(e -> e.getCntrTypeCodeId().toString().equals(item.getCntrTypeCodeId())).findFirst().orElse(null);
 				if (preContainers != null) {
 					map.put("rawTemperature", RegularUtils.forceEmpty(preContainers.getTemperature()));
 					map.put("temperature", RegularUtils.formatTempNumber(RegularUtils.forceEmpty(preContainers.getTemperature()), "T", "温度", 3));

+ 7 - 2
blade-service/blade-los/src/main/java/org/springblade/los/excel/BCorpsExcel.java

@@ -336,11 +336,16 @@ public class BCorpsExcel implements Serializable {
 	@ExcelProperty(value = "存在 PS 0=否 1=是")
 	private Integer isPs;
 	/**
-	 * PS(利润分成) 比例
+	 * PS(内部利润分成) 比例
 	 */
-	@ExcelProperty(value = "PS(利润分成) 比例")
+	@ExcelProperty(value = "PS(内部利润分成) 比例")
 	private BigDecimal psRate;
 	/**
+	 * PS(内部利润分成) 比例
+	 */
+	@ExcelProperty(value = "PS(内部利润分成) 比例")
+	private BigDecimal psRateExternal;
+	/**
 	 * PS允许付大于收 0=否 1=是
 	 */
 	@ExcelProperty(value = "PS允许付大于收 0=否 1=是")