Browse Source

质量事故单,请假单,单号生成

yuansh 2 years ago
parent
commit
2d3c72c86e

+ 1 - 1
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/activiti/listener/ListenerAnnualLeave.java

@@ -61,7 +61,7 @@ public class ListenerAnnualLeave implements TaskListener, JavaDelegate {
 			practical_leave = map.get(field_practical);
 		}
 
-		if(category.equals("2")){
+		if(category.equals("年假")){
 			try {
 				sysUserMapper.updateAnnualInfo(employe_name,Double.valueOf(practical_leave));
 			}catch (Exception e){

+ 5 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/entity/IncidentTicket.java

@@ -223,6 +223,11 @@ public class IncidentTicket implements Serializable {
 	//未处理、已完结
     private String stateText;
 
+	/**
+	 * 订单备注
+	 */
+	private String orderRemarks;
+
 	@TableField(exist = false)
 	private String jiHuaHao;//计划号(子表中数据,以逗号分割显示)
 

+ 3 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/IncidentTicketMapper.java

@@ -24,7 +24,10 @@ public interface IncidentTicketMapper extends BaseMapper<IncidentTicket> {
     int getMaxCode2();
     int getMaxCode3();
 
+    void insertPurBillVouchExtraDefine(@Param("PurBillVouch")Map<String,Object> PurBillVouch);
+    //
     void insertPurBillVouch(@Param("PurBillVouch")Map<String,Object> PurBillVouch);
+    //
     void insertPurBillVouchs(@Param("PurBillVouchs")Map<String,Object> PurBillVouchs);
 
     /**

+ 5 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/xml/IncidentTicketMapper.xml

@@ -134,5 +134,10 @@
 
     </insert>
 
+    <insert id="insertPurBillVouchExtraDefine">
 
+        INSERT into PurBillVouch_ExtraDefine(pbvid,chdefine4)
+        VALUES (#{PurBillVouch.pbvid},#{PurBillVouch.chdefine4})
+
+    </insert>
 </mapper>

+ 7 - 2
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/impl/IncidentTicketServiceImpl.java

@@ -142,6 +142,7 @@ public class IncidentTicketServiceImpl extends ServiceImpl<IncidentTicketMapper,
 		 * 主表
 		 */
 		map.put("cPBVBillType","03");//发票类型 03
+		map.put("chdefine4",incidentTicket.getOrderRemarks());//订单备注
 
 		map.put("iVTid", 131586);//单据模版号
 		if(businessType.equals("委外加工")){
@@ -279,12 +280,14 @@ public class IncidentTicketServiceImpl extends ServiceImpl<IncidentTicketMapper,
 			int chId = incidentTicketMapper.getMaxCode2();
 			map.put("pbvid",chId+1);//主表主键
 			incidentTicketMapper.insertPurBillVouch(map);
+			incidentTicketMapper.insertPurBillVouchExtraDefine(map);
 
 			int chIds = incidentTicketMapper.getMaxCode3();
 			map2.put("pbvid",chId+1);//主表主键
 			map2.put("id",chIds+1);//主键
 			incidentTicketMapper.insertPurBillVouchs(map2);
 
+
 		}catch (Exception e){
 			System.out.println(e.getMessage());
 			resMap.put("msg","同步数据有误,请联系管理员");
@@ -344,7 +347,7 @@ public class IncidentTicketServiceImpl extends ServiceImpl<IncidentTicketMapper,
 		 * 主表
 		 */
 		map.put("cPBVBillType","03");//发票类型 03
-
+		map.put("chdefine4",incidentTicket.getOrderRemarks());//订单备注
 		map.put("iVTid", 131601);//单据模版号
 		if(businessType.equals("委外加工")){
 			map.put("cPTCode","02");//采购类型编码 01普通采购 02委外加工
@@ -479,6 +482,7 @@ public class IncidentTicketServiceImpl extends ServiceImpl<IncidentTicketMapper,
 			int chId = incidentTicketMapper.getMaxCode2();
 			map.put("pbvid",chId+1);//主表主键
 			incidentTicketMapper.insertPurBillVouch(map);
+			incidentTicketMapper.insertPurBillVouchExtraDefine(map);
 
 			int chIds = incidentTicketMapper.getMaxCode3();
 			map2.put("pbvid",chId+1);//主表主键
@@ -547,7 +551,7 @@ public class IncidentTicketServiceImpl extends ServiceImpl<IncidentTicketMapper,
 		 * 主表
 		 */
 		map.put("cPBVBillType","03");//发票类型 03
-
+		map.put("chdefine4",incidentTicket.getOrderRemarks());//订单备注
 		map.put("iVTid", 8167);//单据模版号
 		if(businessType.equals("委外加工")){
 			map.put("cPTCode","02");//采购类型编码 01普通采购 02委外加工
@@ -679,6 +683,7 @@ public class IncidentTicketServiceImpl extends ServiceImpl<IncidentTicketMapper,
 			int chId = incidentTicketMapper.getMaxCode2();
 			map.put("pbvid",chId+1);//主表主键
 			incidentTicketMapper.insertPurBillVouch(map);
+			incidentTicketMapper.insertPurBillVouchExtraDefine(map);
 
 			int chIds = incidentTicketMapper.getMaxCode3();
 			map2.put("pbvid",chId+1);//主表主键

+ 3 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/vo/IncidentTicketPage.java

@@ -218,6 +218,9 @@ public class IncidentTicketPage {
 	@Excel(name = "单据状态", width = 15)
 	private String stateText;
 
+	@Excel(name = "订单备注", width = 15)
+	private String orderRemarks;
+
 	@ExcelCollection(name="森_工厂质量事故单-子表")
 	@ApiModelProperty(value = "森_工厂质量事故单-子表")
 	private List<IncidentTicketChildren> incidentTicketChildrenList;

+ 1 - 1
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java

@@ -1573,7 +1573,7 @@ public class SysUserController {
 
             return String.valueOf(codeVo.getSeqNo());
         }catch (Exception e){
-            return "接口调用异常";
+            return "";
         }
 
     }