Compare commits

..

4 Commits

18 changed files with 79 additions and 17 deletions

View File

@ -31,7 +31,7 @@ import java.util.Map;
* 打印标签模板表 前端控制器 * 打印标签模板表 前端控制器
* *
* @author codeGenerator * @author codeGenerator
* @since 2023-02-20 * @since 2023-03-08
*/ */
@RestController @RestController
@RequestMapping("/code/printModel") @RequestMapping("/code/printModel")

View File

@ -14,7 +14,7 @@ import java.math.BigDecimal;
* 打印标签模板表 * 打印标签模板表
* *
* @author codeGenerator * @author codeGenerator
* @since 2023-02-20 * @since 2023-03-08
*/ */
@Data @Data
@ApiModel(value = "打印标签模板表DTO对象") @ApiModel(value = "打印标签模板表DTO对象")
@ -77,4 +77,7 @@ public class PrintModelDTO implements Serializable {
@ApiModelProperty(value = "线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)") @ApiModelProperty(value = "线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)")
private Integer lineBody; private Integer lineBody;
@ApiModelProperty(value = "是否启用0 停用1 启用")
private Integer isEnable;
} }

View File

@ -14,7 +14,7 @@ import lombok.Data;
* </p> * </p>
* *
* @author codeGenerator * @author codeGenerator
* @since 2023-02-20 * @since 2023-03-08
*/ */
@Data @Data
@TableName("t_print_model") @TableName("t_print_model")
@ -78,6 +78,9 @@ public class PrintModel implements Serializable {
@ApiModelProperty("线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)") @ApiModelProperty("线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)")
private Integer lineBody; private Integer lineBody;
@ApiModelProperty("是否启用0 停用1 启用")
private Integer isEnable;
public static final String ID = "ID"; public static final String ID = "ID";
@ -115,4 +118,6 @@ public class PrintModel implements Serializable {
public static final String LINE_BODY = "line_body"; public static final String LINE_BODY = "line_body";
public static final String IS_ENABLE = "is_enable";
} }

View File

@ -12,7 +12,7 @@ import java.util.Date;
* 打印标签模板表 * 打印标签模板表
* *
* @author codeGenerator * @author codeGenerator
* @since 2023-02-20 * @since 2023-03-08
*/ */
@Data @Data
public class PrintModelExcel { public class PrintModelExcel {
@ -52,5 +52,7 @@ public class PrintModelExcel {
private String content; private String content;
@Excel(name = "线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)") @Excel(name = "线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)")
private Integer lineBody; private Integer lineBody;
@Excel(name = "是否启用0 停用1 启用")
private Integer isEnable;
} }

View File

@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Mapper;
* 打印标签模板表 * 打印标签模板表
* *
* @author codeGenerator * @author codeGenerator
* @since 2023-02-20 * @since 2023-03-08
*/ */
@Mapper @Mapper
public interface PrintModelMapper extends BaseDao<PrintModel> { public interface PrintModelMapper extends BaseDao<PrintModel> {

View File

@ -20,6 +20,7 @@
<id column="IS_PREVIEW" property="isPreview" /> <id column="IS_PREVIEW" property="isPreview" />
<id column="CONTENT" property="content" /> <id column="CONTENT" property="content" />
<id column="line_body" property="lineBody" /> <id column="line_body" property="lineBody" />
<id column="is_enable" property="isEnable" />
</resultMap> </resultMap>
</mapper> </mapper>

View File

@ -1,7 +1,7 @@
-- 菜单初始SQL -- 菜单初始SQL
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1627506543435272194, 1067246875800000035, '打印标签模板表', 'packing/printModel', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1633305189284167681, 1067246875800000035, '打印标签模板表', 'code/printModel', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627506543435272195, 1627506543435272194, '查看', NULL, 'packing:printModel:page,packing:printModel:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1633305189284167682, 1633305189284167681, '查看', NULL, 'code:printModel:page,code:printModel:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627506543435272196, 1627506543435272194, '新增', NULL, 'packing:printModel:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1633305189284167683, 1633305189284167681, '新增', NULL, 'code:printModel:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627506543435272197, 1627506543435272194, '修改', NULL, 'packing:printModel:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1633305189284167684, 1633305189284167681, '修改', NULL, 'code:printModel:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627506543435272198, 1627506543435272194, '删除', NULL, 'packing:printModel:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1633305189284167685, 1633305189284167681, '删除', NULL, 'code:printModel:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1627506543435272199, 1627506543435272194, '导出', NULL, 'packing:printModel:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1633305189284167686, 1633305189284167681, '导出', NULL, 'code:printModel:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now());

View File

@ -8,7 +8,7 @@ import com.cnbm.generator.code.entity.PrintModel;
* 打印标签模板表 * 打印标签模板表
* *
* @author codeGenerator * @author codeGenerator
* @since 2023-02-20 * @since 2023-03-08
*/ */
public interface PrintModelServiceBiz extends CrudService<PrintModel, PrintModelDTO> { public interface PrintModelServiceBiz extends CrudService<PrintModel, PrintModelDTO> {

View File

@ -15,7 +15,7 @@ import java.util.Map;
* 打印标签模板表 * 打印标签模板表
* *
* @author codeGenerator * @author codeGenerator
* @since 2023-02-20 * @since 2023-03-08
*/ */
@Service @Service
public class PrintModelServiceBizImpl extends CrudServiceImpl<PrintModelMapper, PrintModel, PrintModelDTO> implements PrintModelServiceBiz { public class PrintModelServiceBizImpl extends CrudServiceImpl<PrintModelMapper, PrintModel, PrintModelDTO> implements PrintModelServiceBiz {

View File

@ -50,7 +50,7 @@ public class PrintModelController {
@ApiImplicitParam(name = "name", value = "标签名称", paramType = "query", dataTypeClass = String.class), @ApiImplicitParam(name = "name", value = "标签名称", paramType = "query", dataTypeClass = String.class),
@ApiImplicitParam(name = "type", value = "类型0模组标签1等级标签", paramType = "query", dataTypeClass = Integer.class), @ApiImplicitParam(name = "type", value = "类型0模组标签1等级标签", paramType = "query", dataTypeClass = Integer.class),
@ApiImplicitParam(name = "lineBody", value = "线体1=F ; 2=S", paramType = "query", dataTypeClass = Integer.class), @ApiImplicitParam(name = "lineBody", value = "线体1=F ; 2=S", paramType = "query", dataTypeClass = Integer.class),
@ApiImplicitParam(name = "enabled", value = "启用状态:0 、停用1、启用", paramType = "query", dataTypeClass = Integer.class) @ApiImplicitParam(name = "isEnable", value = "启用状态:0 、停用1、启用", paramType = "query", dataTypeClass = Integer.class)
}) })
@PreAuthorize("@ex.hasAuthority('packing:printModel:page')") @PreAuthorize("@ex.hasAuthority('packing:printModel:page')")
public Result<PageData<PrintModelDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<PrintModelDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){

View File

@ -168,4 +168,15 @@ public class WoPackagingBoxController {
} }
@PostMapping("editSubstrateManual")
@ApiOperation("手动编辑包装箱")
@LogOperation("手动编辑包装箱")
public Result editSubstrateManual(@RequestBody WoPackagingBoxDTO dto){
woPackagingBoxService.editSubstrateManual(dto);
return new Result();
}
} }

View File

@ -77,4 +77,7 @@ public class PrintModelDTO implements Serializable {
@ApiModelProperty(value = "线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)") @ApiModelProperty(value = "线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)")
private Integer lineBody; private Integer lineBody;
@ApiModelProperty(value = "是否启用0 停用1 启用")
private Integer isEnable;
} }

View File

@ -78,6 +78,9 @@ public class PrintModel implements Serializable {
@ApiModelProperty("线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)") @ApiModelProperty("线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)")
private Integer lineBody; private Integer lineBody;
@ApiModelProperty("是否启用0 停用1 启用")
private Integer isEnable;
public static final String ID = "ID"; public static final String ID = "ID";
@ -115,4 +118,6 @@ public class PrintModel implements Serializable {
public static final String LINE_BODY = "line_body"; public static final String LINE_BODY = "line_body";
public static final String IS_ENABLE = "is_enable";
} }

View File

@ -52,5 +52,7 @@ public class PrintModelExcel {
private String content; private String content;
@Excel(name = "线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)") @Excel(name = "线体1=F ; 2=S (用于过程1比对和包装打印)(设备传给我们的)")
private Integer lineBody; private Integer lineBody;
@Excel(name = "是否启用0 停用1 启用")
private Integer isEnable;
} }

View File

@ -42,6 +42,8 @@ public interface WoPackagingBoxServiceBiz extends CrudService<WoPackagingBox, Wo
IdVo insertSubstrateManual(WoPackagingBoxDTO dto); IdVo insertSubstrateManual(WoPackagingBoxDTO dto);
void editSubstrateManual(WoPackagingBoxDTO dto);
int updateIsArrivedByBoxNo(Integer isArrived, String boxNo); int updateIsArrivedByBoxNo(Integer isArrived, String boxNo);

View File

@ -47,9 +47,9 @@ public class PrintModelServiceBizImpl extends CrudServiceImpl<PrintModelMapper,
Integer lineBody = Integer.parseInt(params.get("lineBody").toString()); Integer lineBody = Integer.parseInt(params.get("lineBody").toString());
wrapper.eq(ObjectUtils.isNotNull(lineBody), PrintModel.LINE_BODY, lineBody); wrapper.eq(ObjectUtils.isNotNull(lineBody), PrintModel.LINE_BODY, lineBody);
} }
if(params.get("enabled")!=null) { if(params.get("isEnable")!=null) {
Integer enabled = Integer.parseInt(params.get("enabled").toString()); Integer isEnable = Integer.parseInt(params.get("isEnable").toString());
wrapper.eq(ObjectUtils.isNotNull(enabled), PrintModel.ENABLED, enabled); wrapper.eq(ObjectUtils.isNotNull(isEnable), PrintModel.IS_ENABLE, isEnable);
} }
return wrapper; return wrapper;

View File

@ -196,6 +196,33 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBox
return IdVo.builder().id(box.getId()).build(); return IdVo.builder().id(box.getId()).build();
} }
@Override
@Transactional(rollbackFor = Exception.class)
public void editSubstrateManual(WoPackagingBoxDTO dto) {
//获取模组
List<WoPackagingBoxSubstrate> substrateList = dto.getSubstrateList();
for(WoPackagingBoxSubstrate substrate : substrateList){
//新增id为空 模组非空
if(ObjectUtils.isEmpty(substrate.getId()) && StringUtils.isNotBlank(substrate.getWoSubstrateId())) {
substrate.setPackagingBoxId(dto.getBoxNo());
substrate.setPowerLevel(dto.getPowerLevel());
substrate.setSapMaterial(dto.getSapMaterial());
substrate.setLineBody(dto.getLineBody());
BaseSupportUtils.setCommonField(substrate);
woPackagingBoxSubstrateServiceBiz.insert(substrate);
}
//编辑id非空 模组非空
if(ObjectUtils.isNotEmpty(substrate.getId()) && StringUtils.isNotBlank(substrate.getWoSubstrateId())) {
BaseSupportUtils.setUpdateCommonField(substrate);
woPackagingBoxSubstrateServiceBiz.updateById(substrate);
}
//删除id非空 模组为空
if(ObjectUtils.isNotEmpty(substrate.getId()) && StringUtils.isBlank(substrate.getWoSubstrateId())) {
woPackagingBoxSubstrateServiceBiz.deleteById(substrate.getId());
}
}
}
@Override @Override
public int updateIsArrivedByBoxNo(Integer isArrived, String boxNo) { public int updateIsArrivedByBoxNo(Integer isArrived, String boxNo) {
return mapper.updateIsArrivedByBoxNo(isArrived,boxNo); return mapper.updateIsArrivedByBoxNo(isArrived,boxNo);

View File

@ -21,6 +21,7 @@
<id column="IS_PREVIEW" property="isPreview" /> <id column="IS_PREVIEW" property="isPreview" />
<id column="CONTENT" property="content" /> <id column="CONTENT" property="content" />
<id column="line_body" property="lineBody" /> <id column="line_body" property="lineBody" />
<id column="is_enable" property="isEnable" />
</resultMap> </resultMap>
<select id="list" resultType="com.cnbm.packing.dto.PrintModelDTO"> <select id="list" resultType="com.cnbm.packing.dto.PrintModelDTO">