LLL 1 год назад
Родитель
Сommit
144009b58c

+ 56 - 0
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/controller/TMDYController.java

@@ -0,0 +1,56 @@
+package org.jeecg.modules.itdmGongDan.controller;
+
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.modules.itdmGongDan.entity.ItdmGongdanMaster;
+import org.jeecg.modules.itdmGongDan.service.IItdmGongdanMasterService;
+import org.jeecg.modules.itdmGongDan.vo.TMDYVO;
+import org.jeecg.modules.weituo.convert.WeituoConvert;
+import org.jeecg.modules.weituo.entity.ItdmWeituoInfo;
+import org.jeecg.modules.weituo.service.IItdmWeituoInfoService;
+import org.jeecg.modules.weituo.vo.ItdmWeituoInfoTMDYVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 条码打印
+ */
+@Api(tags="条码打印")
+@RestController
+@RequestMapping("/tmdy")
+@Slf4j
+public class TMDYController {
+
+    @Autowired
+    @SuppressWarnings("all")
+    private IItdmGongdanMasterService itdmGongdanMasterService;
+    @Autowired
+    @SuppressWarnings("all")
+    private IItdmWeituoInfoService weituoInfoService;
+
+
+    /**
+     * 根据委托id查工单master
+     */
+    @ApiOperation(value="根据委托id查工单master", notes="根据委托id查工单master")
+    @GetMapping(value = "/listByWeituoId")
+    public TMDYVO listByWeituoId(@RequestParam(name="weituoId") String weituoId){
+        TMDYVO tmdyvo = new TMDYVO();
+        ItdmWeituoInfo weituoInfo = weituoInfoService.getById(weituoId);
+        ItdmWeituoInfoTMDYVO infoTMDYVO = WeituoConvert.INSTANCE.toWeituoInfoTMDYVO(weituoInfo);
+
+        List<ItdmGongdanMaster> list = itdmGongdanMasterService.listByWeituoId(weituoId);
+
+        tmdyvo.setInfoTMDYVO(infoTMDYVO);
+        tmdyvo.setList(list);
+        return tmdyvo;
+    }
+
+}

+ 8 - 1
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/service/IItdmGongdanMasterService.java

@@ -1,7 +1,9 @@
 package org.jeecg.modules.itdmGongDan.service;
 
-import org.jeecg.modules.itdmGongDan.entity.ItdmGongdanMaster;
 import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.itdmGongDan.entity.ItdmGongdanMaster;
+
+import java.util.List;
 
 /**
  * @Description: 工单master
@@ -11,4 +13,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IItdmGongdanMasterService extends IService<ItdmGongdanMaster> {
 
+    /**
+     * 根据委托id查工单master
+     */
+    public List<ItdmGongdanMaster> listByWeituoId(String weituoId);
+
 }

+ 17 - 0
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/vo/TMDYVO.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.itdmGongDan.vo;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+import org.jeecg.modules.itdmGongDan.entity.ItdmGongdanMaster;
+import org.jeecg.modules.weituo.vo.ItdmWeituoInfoTMDYVO;
+
+import java.util.List;
+
+@Data
+@Accessors(chain = true)
+public class TMDYVO {
+
+    private ItdmWeituoInfoTMDYVO infoTMDYVO;
+    private List<ItdmGongdanMaster> list;
+
+}

+ 7 - 0
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/weituo/convert/WeituoConvert.java

@@ -6,6 +6,7 @@ import org.jeecg.modules.weituo.entity.ItdmWeituoInfo;
 import org.jeecg.modules.weituo.entity.ItdmWeituoYangpin;
 import org.jeecg.modules.weituo.entity.ItdmWeituoYangpinExtend;
 import org.jeecg.modules.weituo.vo.ItdmWeituoInfoInfoVO;
+import org.jeecg.modules.weituo.vo.ItdmWeituoInfoTMDYVO;
 import org.mapstruct.Mapper;
 import org.mapstruct.Mapping;
 import org.mapstruct.ReportingPolicy;
@@ -58,4 +59,10 @@ public interface WeituoConvert {
     List<ItdmWeituoInfoInfoVO.WeituoYangpin> convertList(List<ItdmWeituoYangpin> info);
 
 //    List<ItdmWeituoInfoInfoVO.WeituoYangPinShiYan> convertShiyanList(List<ItdmWeituoYangpinExtend> info, List<ItdmWeituoYangpin> list);
+
+
+
+    /**委托信息对象转化成条码打印所需信息的VO*/
+    ItdmWeituoInfoTMDYVO toWeituoInfoTMDYVO(ItdmWeituoInfo weituoInfo);
+
 }

+ 33 - 0
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/weituo/vo/ItdmWeituoInfoTMDYVO.java

@@ -0,0 +1,33 @@
+package org.jeecg.modules.weituo.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+@Data
+@Accessors(chain = true)
+public class ItdmWeituoInfoTMDYVO {
+
+    /**委托编号*/
+    @Excel(name = "委托编号", width = 15)
+    @ApiModelProperty(value = "委托编号")
+    private String weituoNo;
+    /**委托单位名称*/
+    @Excel(name = "委托单位名称", width = 15)
+    @ApiModelProperty(value = "委托单位名称")
+    private String weituoClient;
+    /**委托单位地址*/
+    @Excel(name = "委托单位地址", width = 15)
+    @ApiModelProperty(value = "委托单位地址")
+    private String weituoAddress;
+    /**委托联系人*/
+    @Excel(name = "委托联系人", width = 15)
+    @ApiModelProperty(value = "委托联系人")
+    private String weituoLxr;
+    /**委托电话*/
+    @Excel(name = "委托电话", width = 15)
+    @ApiModelProperty(value = "委托电话")
+    private String weituoPhone;
+
+}