xiaochan преди 4 години
родител
ревизия
a02ef04c95

+ 16 - 0
src/main/java/thyyxxk/webserver/controller/datamodify/InOrOutOfWarehouseController.java

@@ -6,6 +6,7 @@ import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
 import thyyxxk.webserver.entity.datamodify.InOrOutOfWarehousePojo;
 import thyyxxk.webserver.entity.datamodify.YpInDetl;
+import thyyxxk.webserver.entity.datamodify.YpOutDetl;
 import thyyxxk.webserver.service.datamodify.InOrOutOfWarehouseService;
 
 import java.util.List;
@@ -45,4 +46,19 @@ public class InOrOutOfWarehouseController {
     public ResultVo<String> xiuGiRuKuXinXi(@RequestBody YpInDetl param) {
         return service.xiuGiRuKuXinXi(param);
     }
+
+    @PostMapping("/queryChuKuXinXi")
+    public ResultVo<Map<String, Object>> queryChuKuXinXi(@RequestBody InOrOutOfWarehousePojo param) {
+        return service.queryChuKuXinXi(param);
+    }
+
+    @GetMapping("/queryDeptCode")
+    public ResultVo<Map<String, Object>> queryDeptCode() {
+        return service.queryDeptCode();
+    }
+
+    @PostMapping("/xiuGaiChuKuXinXi")
+    public ResultVo<String> xiuGaiChuKuXinXi(@RequestBody YpOutDetl param) {
+        return service.xiuGaiChuKuXinXi(param);
+    }
 }

+ 34 - 2
src/main/java/thyyxxk/webserver/dao/his/datamodify/InOrOutOfWarehouseDao.java

@@ -8,6 +8,7 @@ import org.apache.ibatis.annotations.Update;
 import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
 import thyyxxk.webserver.entity.datamodify.InOrOutOfWarehousePojo;
 import thyyxxk.webserver.entity.datamodify.YpInDetl;
+import thyyxxk.webserver.entity.datamodify.YpOutDetl;
 
 import java.util.List;
 
@@ -26,7 +27,7 @@ public interface InOrOutOfWarehouseDao {
             "select supply_code_name = (select name from yp_zd_supply where code = supply_code), " +
             "manu_code_name = (select name from yp_zd_manufactory where code = manu_code)," +
             "purchaser_name = (select  name from a_employee_mi where code = purchaser)," +
-            "charge_code_name = (select  name from yp_zd_dict where isnull(del_flag,0) = 0 " +
+            "charge_code_name = (select name from yp_zd_dict where isnull(del_flag,0) = 0 " +
             "and serial = yp_in_detl.serial  and code = charge_code),* " +
             "from yp_in_detl where in_date &gt;= #{param.startTime} and in_date&lt;=#{param.endTime} " +
             "<if test=\"param.inDocuNo!=null and param.inDocuNo!=''\">" +
@@ -46,6 +47,37 @@ public interface InOrOutOfWarehouseDao {
             "license_no=#{licenseNo},in_comment=#{inComment}, " +
             "in_date=#{inDate},sys_date=#{inDate},confirm_date=#{confirmDate}," +
             "fp_date=#{fpDate},eff_date=#{effDate} " +
-            "where in_docu_no = #{oldInDocuNo} and charge_code = #{chargeCode}")
+            "where in_docu_no = #{oldInDocuNo} and charge_code = #{chargeCode} and in_seri=#{inSeri}")
     void xiuGiRuKuXinXi(YpInDetl param);
+
+
+    @Select("<script>" +
+            "select charge_code,out_seri,draw_no,in_draw_no,in_date,group_no,group_no_out,dept_code,out_date,confirm_date,  " +
+            "dept_code_name = (select name from zd_unit_code where code = dept_code),  " +
+            "group_no_name = (select group_name from  yp_zd_group_name where group_no = yp_out_detl.group_no) ," +
+            "group_no_out_name = (select group_name from  yp_zd_group_name where group_no = yp_out_detl.group_no) ," +
+            "charge_code_name = (select name from yp_zd_dict where  " +
+            "code = charge_code and serial = yp_out_detl.serial)  " +
+            "from yp_out_detl where out_date &gt;= #{param.startTime} and out_date&lt;=#{param.endTime} " +
+            "<if test=\"param.inDrawNo!=null and param.inDrawNo!=''\">" +
+            "and in_draw_no=#{param.inDrawNo}" +
+            "</if>" +
+            "</script>")
+    List<YpOutDetl> queryChuKuXinXi(IPage<InOrOutOfWarehousePojo> page, @Param("param") InOrOutOfWarehousePojo param);
+
+
+    @Select("select code,rtrim(name)name from zd_unit_code")
+    List<GetDropdownBox> queryDeptCode();
+
+    @Select("select group_no code,rtrim(group_name) name from yp_zd_group_name")
+    List<GetDropdownBox> queryGroupNo();
+
+    @Update("update yp_out_detl set draw_no=#{drawNo},out_seri=#{outSeri},in_draw_no=#{inDrawNo},   " +
+            "in_date=#{inDate},group_no=#{groupNo},group_no_out=#{groupNoOut},dept_code=#{deptCode},out_date=#{outDate},   " +
+            "sys_date=#{outDate},   " +
+            "confirm_date=#{confirmDate}   " +
+            "where out_seri=#{outSeri} and draw_no=#{oldDrawNo} and charge_code = #{chargeCode}")
+    void xiuGaiChuKu(YpOutDetl param);
+
+
 }

+ 1 - 1
src/main/java/thyyxxk/webserver/entity/datamodify/InOrOutOfWarehousePojo.java

@@ -15,7 +15,7 @@ public class InOrOutOfWarehousePojo {
     private String startTime;
     private String endTime;
     private String inDocuNo;
-    private String drawNo;
+    private String inDrawNo;
     private long currentPage;
     private long pageSize;
 }

+ 229 - 0
src/main/java/thyyxxk/webserver/entity/datamodify/YpOutDetl.java

@@ -0,0 +1,229 @@
+package thyyxxk.webserver.entity.datamodify;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class YpOutDetl implements Serializable {
+
+    private static final long serialVersionUID = 6284167607418043811L;
+
+    private String chargeCodeName;
+    private String deptCodeName;
+    private String groupNoName;
+    private String groupNoOutName;
+    private String oldDrawNo;
+
+    /**
+     * outDate
+     */
+    private Date outDate;
+
+    /**
+     * outSeri
+     */
+    private Integer outSeri;
+
+    /**
+     * inDate
+     */
+    private Date inDate;
+
+    /**
+     * inSeri
+     */
+    private Integer inSeri;
+
+    /**
+     * drawNo
+     */
+    private String drawNo;
+
+    /**
+     * section
+     */
+    private String section;
+
+    /**
+     * chargeCode
+     */
+    private String chargeCode;
+
+    /**
+     * serial
+     */
+    private String serial;
+
+    /**
+     * packRetprice
+     */
+    private Double packRetprice;
+
+    /**
+     * issueAmt
+     */
+    private Double issueAmt;
+
+    /**
+     * drawer
+     */
+    private String drawer;
+
+    /**
+     * keeper
+     */
+    private String keeper;
+
+    /**
+     * effDate
+     */
+    private Date effDate;
+
+    /**
+     * pcjSign
+     */
+    private String pcjSign;
+
+    /**
+     * acctSign
+     */
+    private String acctSign;
+
+    /**
+     * acceptSign
+     */
+    private String acceptSign;
+
+    /**
+     * stockAmount
+     */
+    private Double stockAmount;
+
+    /**
+     * fixPrice
+     */
+    private Double fixPrice;
+
+    /**
+     * groupNo
+     */
+    private String groupNo;
+
+    /**
+     * groupNoOut
+     */
+    private String groupNoOut;
+
+    /**
+     * buyPrice
+     */
+    private Double buyPrice;
+
+    /**
+     * sysDate
+     */
+    private Date sysDate;
+
+    /**
+     * manuNo
+     */
+    private String manuNo;
+
+    /**
+     * outSeriCz
+     */
+    private Integer outSeriCz;
+
+    /**
+     * unit
+     */
+    private String unit;
+
+    /**
+     * chequeNo
+     */
+    private String chequeNo;
+
+    /**
+     * reptNo
+     */
+    private String reptNo;
+
+    /**
+     * alloPrice
+     */
+    private Double alloPrice;
+
+    /**
+     * inDrawNo
+     */
+    private String inDrawNo;
+
+    /**
+     * drawYf
+     */
+    private String drawYf;
+
+    /**
+     * deptCode
+     */
+    private String deptCode;
+
+    /**
+     * outAmt
+     */
+    private Double outAmt;
+
+    /**
+     * outType
+     */
+    private String outType;
+
+    /**
+     * acctType
+     */
+    private String acctType;
+
+    /**
+     * acctId
+     */
+    private String acctId;
+
+    /**
+     * acctDate
+     */
+    private Date acctDate;
+
+    /**
+     * confirmId
+     */
+    private String confirmId;
+
+    /**
+     * confirmFlag
+     */
+    private String confirmFlag;
+
+    /**
+     * confirmDate
+     */
+    private Date confirmDate;
+
+    /**
+     * inputId
+     */
+    private String inputId;
+
+    /**
+     * serialTh
+     */
+    private Integer serialTh;
+
+    /**
+     * amountTh
+     */
+    private Double amountTh;
+
+}

+ 30 - 2
src/main/java/thyyxxk/webserver/service/datamodify/InOrOutOfWarehouseService.java

@@ -12,7 +12,9 @@ import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
 import thyyxxk.webserver.entity.datamodify.InOrOutOfWarehousePojo;
 import thyyxxk.webserver.entity.datamodify.YpInDetl;
+import thyyxxk.webserver.entity.datamodify.YpOutDetl;
 import thyyxxk.webserver.utils.ResultVoUtil;
+import thyyxxk.webserver.utils.TokenUtil;
 
 import java.util.HashMap;
 import java.util.List;
@@ -37,7 +39,6 @@ public class InOrOutOfWarehouseService {
     }
 
     public ResultVo<Map<String, Object>> queryRuKuXinXi(InOrOutOfWarehousePojo param) {
-        System.out.println(param);
         IPage<InOrOutOfWarehousePojo> page = new Page<>(param.getCurrentPage(), param.getPageSize());
         List<YpInDetl> list = dao.queryRuKuXinXi(page, param);
         if (list.size() > 0) {
@@ -66,7 +67,34 @@ public class InOrOutOfWarehouseService {
 
     public ResultVo<String> xiuGiRuKuXinXi(YpInDetl param) {
         dao.xiuGiRuKuXinXi(param);
-        log.info("修改入库信息:数据{},根据入库单号和药品编码", param);
+        log.info("修改入库信息:{},修改人:{}", param, TokenUtil.getTokenUserId());
         return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION, "修改成功");
     }
+    /* 出库的信息*/
+
+    public ResultVo<Map<String, Object>> queryChuKuXinXi(InOrOutOfWarehousePojo param) {
+        log.info("查询出库数据:{}", param);
+        IPage<InOrOutOfWarehousePojo> page = new Page<>(param.getCurrentPage(), param.getPageSize());
+        List<YpOutDetl> list = dao.queryChuKuXinXi(page, param);
+        if (list.size() > 0) {
+            Map<String, Object> map = new HashMap<>(Capacity.TWO);
+            map.put("data", list);
+            map.put("total", page.getTotal());
+            return ResultVoUtil.success(map);
+        }
+        return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);
+    }
+
+    public ResultVo<Map<String, Object>> queryDeptCode() {
+        Map<String, Object> map = new HashMap<>(Capacity.TWO);
+        map.put("deptCode", dao.queryDeptCode());
+        map.put("groupNo", dao.queryGroupNo());
+        return ResultVoUtil.success(map);
+    }
+
+    public ResultVo<String> xiuGaiChuKuXinXi(YpOutDetl param) {
+        log.info("修改出库信息:{},修改人:{}", param, TokenUtil.getTokenUserId());
+        dao.xiuGaiChuKu(param);
+        return ResultVoUtil.success("修改成功");
+    }
 }