浏览代码

Merge branch 'dev_v1.0.0' into dev_v1.0.1

# Conflicts:
#	sop-business/src/main/resources/db/log/wangliang_update_log.sql
caozixuan 1 年之前
父节点
当前提交
1f9f46213c

+ 2 - 1
sop-api/src/main/java/com/qmth/sop/server/api/SysDeviceController.java

@@ -63,12 +63,13 @@ public class SysDeviceController {
                 @ApiParam(value = "品牌", required = false) @RequestParam(required = false) String brand,
                 @ApiParam(value = "型号", required = false) @RequestParam(required = false) String model,
                 @ApiParam(value = "设备编号", required = false) @RequestParam(required = false) String deviceCode,
+                @ApiParam(value = "设备序列号", required = false) @RequestParam(required = false) String serialNo,
                 @ApiParam(value = "运行状态", required = false) @RequestParam(required = false) DeviceStatusEnum status,
                 @ApiParam(value = "出库/入库", required = false) @RequestParam(required = false) InOutTypeEnum bound,
                 @ApiParam(value = "启用/禁用", required = false) @RequestParam(required = false) Boolean enable,
                 @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                 @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
-        IPage<SysDeviceResult> resultIPage = sysDeviceService.query(new Page<>(pageNumber, pageSize),supplierId,brand,model,deviceCode,status,bound,enable);
+        IPage<SysDeviceResult> resultIPage = sysDeviceService.query(new Page<>(pageNumber, pageSize),supplierId,brand,model,deviceCode,serialNo,status,bound,enable);
 
         return ResultUtil.ok(resultIPage);
     }

+ 6 - 6
sop-business/src/main/java/com/qmth/sop/business/bean/params/DeviceInOutForm.java

@@ -13,8 +13,8 @@ import java.util.List;
  */
 public class DeviceInOutForm implements Serializable {
 
-    @ApiModelProperty("设备号")
-    private String deviceNo;
+    @ApiModelProperty("设备序列号")
+    private String serialNo;
 
     @ApiModelProperty("设备品牌")
     private String deviceBrand;
@@ -40,12 +40,12 @@ public class DeviceInOutForm implements Serializable {
     @ApiModelProperty("快递单拍照")
     private String basePhotoPath;
 
-    public String getDeviceNo() {
-        return deviceNo;
+    public String getSerialNo() {
+        return serialNo;
     }
 
-    public void setDeviceNo(String deviceNo) {
-        this.deviceNo = deviceNo;
+    public void setSerialNo(String serialNo) {
+        this.serialNo = serialNo;
     }
 
     public String getDeviceBrand() {

+ 1 - 1
sop-business/src/main/java/com/qmth/sop/business/mapper/SysDeviceMapper.java

@@ -25,5 +25,5 @@ public interface SysDeviceMapper extends BaseMapper<SysDevice> {
 	 * @return
 	 */
 
-	IPage<SysDeviceResult> query(IPage<Map> iPage,@Param("supplierId")  Long supplierId,@Param("brand")  String brand,@Param("model")  String model,@Param("deviceCode")  String deviceCode,@Param("status")  String status,@Param("bound")  String bound,@Param("enable")  Boolean enable);
+	IPage<SysDeviceResult> query(IPage<Map> iPage,@Param("supplierId")  Long supplierId,@Param("brand")  String brand,@Param("model")  String model,@Param("deviceCode")  String deviceCode,@Param("serialNo")  String serialNo,@Param("status")  String status,@Param("bound")  String bound,@Param("enable")  Boolean enable);
 }

+ 1 - 1
sop-business/src/main/java/com/qmth/sop/business/service/SysDeviceService.java

@@ -27,7 +27,7 @@ public interface SysDeviceService extends IService<SysDevice>{
     * @param iPage
     * @return
     */
-    IPage<SysDeviceResult> query(IPage<Map> iPage, Long supplierId, String brand, String model, String deviceCode, DeviceStatusEnum status, InOutTypeEnum bound, Boolean enable);
+    IPage<SysDeviceResult> query(IPage<Map> iPage, Long supplierId, String brand, String model, String deviceCode,String serialNo, DeviceStatusEnum status, InOutTypeEnum bound, Boolean enable);
 
     /**
     * 新增修改设备配置表

+ 9 - 2
sop-business/src/main/java/com/qmth/sop/business/service/impl/SysDeviceServiceImpl.java

@@ -10,6 +10,7 @@ import com.qmth.sop.business.entity.SysDevice;
 import com.qmth.sop.business.entity.SysUser;
 import com.qmth.sop.business.mapper.SysDeviceMapper;
 import com.qmth.sop.business.service.SysDeviceService;
+import com.qmth.sop.common.contant.SystemConstant;
 import com.qmth.sop.common.enums.DeviceStatusEnum;
 import com.qmth.sop.common.enums.ExceptionResultEnum;
 import com.qmth.sop.common.enums.FieldUniqueEnum;
@@ -46,8 +47,14 @@ public class SysDeviceServiceImpl extends ServiceImpl<SysDeviceMapper, SysDevice
      * @return
      */
     @Override
-    public IPage<SysDeviceResult> query(IPage<Map> iPage, Long supplierId, String brand, String model, String deviceCode, DeviceStatusEnum status, InOutTypeEnum bound, Boolean enable) {
-        return this.baseMapper.query(iPage, supplierId,brand,model,deviceCode,Objects.nonNull(status)?status.name():null,Objects.nonNull(bound)?bound.name():null,enable);
+    public IPage<SysDeviceResult> query(IPage<Map> iPage, Long supplierId, String brand, String model, String deviceCode,String serialNo, DeviceStatusEnum status, InOutTypeEnum bound, Boolean enable) {
+        if (deviceCode != null && deviceCode.length() > 0){
+            deviceCode = SystemConstant.translateSpecificSign(deviceCode);
+        }
+        if (serialNo != null && serialNo.length() > 0){
+            serialNo = SystemConstant.translateSpecificSign(serialNo);
+        }
+        return this.baseMapper.query(iPage, supplierId,brand,model,deviceCode,serialNo,Objects.nonNull(status)?status.name():null,Objects.nonNull(bound)?bound.name():null,enable);
     }
 
     /**

+ 3 - 3
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBDeviceInOutServiceImpl.java

@@ -125,7 +125,7 @@ public class TBDeviceInOutServiceImpl extends ServiceImpl<TBDeviceInOutMapper, T
         } else {
             usageType = DeviceUsageTypeEnum.OTHER;
         }
-        if (deviceInOutSubmitParam.getDeviceInOutFormList().size() > deviceInOutSubmitParam.getDeviceInOutFormList().stream().map(DeviceInOutForm::getDeviceNo).distinct().count()) {
+        if (deviceInOutSubmitParam.getDeviceInOutFormList().size() > deviceInOutSubmitParam.getDeviceInOutFormList().stream().map(DeviceInOutForm::getSerialNo).distinct().count()) {
             throw ExceptionResultEnum.ERROR.exception("出入库登记表中设备编号有重复");
         }
 
@@ -149,7 +149,7 @@ public class TBDeviceInOutServiceImpl extends ServiceImpl<TBDeviceInOutMapper, T
             }
             tbDeviceInOut.setUserId(requestUser.getId());
             tbDeviceInOut.setType(inOutType);
-            tbDeviceInOut.setDeviceNo(e.getDeviceNo());
+            tbDeviceInOut.setDeviceNo(e.getSerialNo());
             tbDeviceInOut.setSupplierName(e.getSupplierName());
             tbDeviceInOut.setLocation(e.getLocation());
             tbDeviceInOut.setAddress(e.getAddress());
@@ -169,7 +169,7 @@ public class TBDeviceInOutServiceImpl extends ServiceImpl<TBDeviceInOutMapper, T
                     .set(SysDevice::getScanCount, e.getScanCount())
                     .set(SysDevice::getStatus, e.getDeviceStatus())
                     .set(SysDevice::getBound, inOutType)
-                    .eq(SysDevice::getDeviceCode, e.getDeviceNo());
+                    .eq(SysDevice::getDeviceCode, e.getSerialNo());
             sysDeviceService.update(updateWrapper);
 
             return Stream.of(tbDeviceInOut);

+ 44 - 0
sop-business/src/main/resources/db/log/wangliang_update_log.sql

@@ -2190,6 +2190,50 @@ ALTER TABLE t_b_project_exchange ADD CONSTRAINT t_b_project_exchange_un_exchange
 ALTER TABLE t_b_violation ADD CONSTRAINT t_b_violation_un_code UNIQUE KEY (code);
 ALTER TABLE t_b_crm ADD CONSTRAINT t_b_crm_un_crm_no UNIQUE KEY (crm_no);
 
+--2023.11.30update
+DELETE FROM t_b_product WHERE id=1;
+
+INSERT INTO t_d_form_widget
+(id, code, `type`, form_id, form_name, title, input_type, required, readable, writable, visable, `scale`, `length`, binding, data_grid, tips, format, span, sub_title, `options`, flow_type, form_setup, handle, form_group, role_type, create_id, create_time)
+VALUES(191, 'RADIO', 'FORM', 'third_service_region_cb', 'third_service_region_cb', '外包服务范围', 'STRING', 1, 0, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, 12, NULL, '[{"value":"SCAN","label":"仅扫描"},{"value":"SCAN_MARK","label":"扫描+评卷"}]', 'OFFICE_SOP_FLOW', 1, 0, NULL, NULL, 1, 15);
+
+UPDATE t_d_form_widget
+SET code='ONLY_TITLE', `type`='FORM', form_id='project_rish_title', form_name='project_rish_title', title='项目风险预估(仅供参考)', input_type='STRING', required=0, readable=1, writable=0, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=12, sub_title=NULL, `options`=NULL, flow_type='OFFICE_SOP_FLOW', form_setup=1, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=16
+WHERE id=31;
+UPDATE t_d_form_widget
+SET code='RADIO', `type`='FORM', form_id='delay_rish_cb', form_name='delay_rish_cb', title='延期风险', input_type='STRING', required=1, readable=0, writable=1, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=12, sub_title=NULL, `options`='[{"value":"LOW","label":"低"},{"value":"MIDDLE","label":"中"},{"value":"HIGH","label":"高"}]', flow_type='OFFICE_SOP_FLOW', form_setup=1, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=17
+WHERE id=32;
+UPDATE t_d_form_widget
+SET code='RADIO', `type`='FORM', form_id='engineer_rish_cb', form_name='engineer_rish_cb', title='实施难度', input_type='STRING', required=1, readable=0, writable=1, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=12, sub_title=NULL, `options`='[{"value":"LOW","label":"低"},{"value":"MIDDLE","label":"中"},{"value":"HIGH","label":"高"}]', flow_type='OFFICE_SOP_FLOW', form_setup=1, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=18
+WHERE id=33;
+UPDATE t_d_form_widget
+SET code='TEXTAREA', `type`='FORM', form_id='other_remark', form_name='other_remark', title='其它备注(建议关注的其它方面)', input_type='STRING', required=0, readable=0, writable=1, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=12, sub_title=NULL, `options`=NULL, flow_type='OFFICE_SOP_FLOW', form_setup=1, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=19
+WHERE id=34;
+UPDATE t_d_form_widget
+SET code='FORM_GROUP_TITLE', `type`='FORM', form_id='project_contacts_title', form_name='project_contacts_title', title='项目联系人', input_type='STRING', required=0, readable=1, writable=0, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=12, sub_title=NULL, `options`=NULL, flow_type='OFFICE_SOP_FLOW', form_setup=1, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=20
+WHERE id=35;
+UPDATE t_d_form_widget
+SET code='TABLE', `type`='FORM', form_id='project_contacts_table', form_name='project_contacts_table', title='项目联系人表格', input_type='STRING', required=1, readable=0, writable=1, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=12, sub_title=NULL, `options`=NULL, flow_type='OFFICE_SOP_FLOW', form_setup=1, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=21
+WHERE id=36;
+UPDATE t_d_form_widget
+SET code='TEXT', `type`='TABLE', form_id='school_college', form_name='school_college', title='项目联系人表格_机构输入框', input_type='STRING', required=1, readable=0, writable=1, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=3, sub_title=NULL, `options`=NULL, flow_type='OFFICE_SOP_FLOW', form_setup=1, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=22
+WHERE id=37;
+UPDATE t_d_form_widget
+SET code='TEXT', `type`='TABLE', form_id='school_name', form_name='school_name', title='项目联系人表格_姓名输入框', input_type='STRING', required=1, readable=0, writable=1, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=3, sub_title=NULL, `options`=NULL, flow_type='OFFICE_SOP_FLOW', form_setup=1, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=23
+WHERE id=38;
+UPDATE t_d_form_widget
+SET code='TEXT', `type`='TABLE', form_id='school_job', form_name='school_job', title='项目联系人表格_职务输入框', input_type='STRING', required=1, readable=0, writable=1, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=3, sub_title=NULL, `options`=NULL, flow_type='OFFICE_SOP_FLOW', form_setup=1, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=24
+WHERE id=39;
+UPDATE t_d_form_widget
+SET code='TEXT', `type`='TABLE', form_id='school_tel', form_name='school_tel', title='项目联系人表格_电话输入框', input_type='STRING', required=1, readable=0, writable=1, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=3, sub_title=NULL, `options`=NULL, flow_type='OFFICE_SOP_FLOW', form_setup=1, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=25
+WHERE id=40;
+
+update t_b_sop_info t set t.product_id = 2
+where t.product_id = 1;
+
+update t_b_crm t set t.product_id = 2
+where t.product_id = 1;
+
 --2023.11.28update
 DROP TABLE IF EXISTS `t_b_device_delivery`;
 CREATE TABLE `t_b_device_delivery` (

+ 1 - 1
sop-business/src/main/resources/mapper/DeviceMonitorMapper.xml

@@ -91,7 +91,7 @@
         t_b_service s
 
         left join t_b_device_in_out io on io.service_id=s.id
-        left join sys_device d on d.device_code=io.device_no
+        left join sys_device d on d.serial_no=io.serial_no
         <where>
             and s.status !='FINISH'
             <if test="dpr != null and !dpr.hasAdmin and !dpr.hasPmo">

+ 1 - 1
sop-business/src/main/resources/mapper/ServiceAnalyseMapper.xml

@@ -304,7 +304,7 @@
         FROM
         t_b_service s
         LEFT JOIN t_b_device_in_out io ON io.service_id = s.id
-        LEFT JOIN sys_device d ON d.device_code = io.device_no
+        LEFT JOIN sys_device d ON d.serial_no = io.serial_no
         LEFT JOIN sys_supplier su ON su.id = d.supplier_id
         <where>
             and io.id IS NOT NULL

+ 4 - 1
sop-business/src/main/resources/mapper/SysDeviceMapper.xml

@@ -16,7 +16,10 @@
                 and a.model = #{model}
             </if>
             <if test="deviceCode != null and deviceCode != ''">
-                and a.device_code = #{deviceCode}
+                and a.device_code LIKE CONCAT('%',#{deviceCode},'%')
+            </if>
+            <if test="serialNo != null and serialNo != ''">
+                and a.serial_no LIKE CONCAT('%',#{serialNo},'%')
             </if>
             <if test="status != null and status != ''">
                 and a.status = #{status}

+ 4 - 4
sop-business/src/main/resources/mapper/TBDeviceInOutMapper.xml

@@ -30,7 +30,7 @@
                 LEFT JOIN
             t_b_service tbs ON tbdio.service_id = tbs.id
                 LEFT JOIN
-            sys_device sd ON tbdio.device_no = sd.device_code
+            sys_device sd ON tbdio.serial_no = sd.serial_no
                 LEFT JOIN
             sys_user su ON tbdio.user_id = su.id
                 LEFT JOIN
@@ -124,7 +124,7 @@
                 LEFT JOIN
             t_b_service tbs ON tbdio.service_id = tbs.id
                 LEFT JOIN
-            sys_device sd ON tbdio.device_no = sd.device_code
+            sys_device sd ON tbdio.serial_no = sd.serial_no
                 LEFT JOIN
             sys_user su ON tbdio.user_id = su.id
                 LEFT JOIN
@@ -244,10 +244,10 @@
             </if>
             <choose>
                 <when test="sopNo != null and sopNo != ''">
-                    AND EXISTS(SELECT 1 FROM t_b_device_in_out tbdio WHERE tbdio.device_no = sd.device_code AND tbdio.sop_no = #{sopNo})
+                    AND EXISTS(SELECT 1 FROM t_b_device_in_out tbdio WHERE tbdio.serial_no = sd.device_code AND tbdio.sop_no = #{sopNo})
                 </when>
                 <otherwise>
-                    AND EXISTS(SELECT 1 FROM t_b_device_in_out tbdio WHERE tbdio.device_no = sd.device_code AND tbdio.service_id IS NULL)
+                    AND EXISTS(SELECT 1 FROM t_b_device_in_out tbdio WHERE tbdio.serial_no = sd.device_code AND tbdio.service_id IS NULL)
                 </otherwise>
             </choose>
         </where>