Merge remote-tracking branch 'origin/master'
| | |
| | | os_del_doc.cmd |
| | | .svn |
| | | derby.log |
| | | .gitignore |
| | |
| | | import com.alibaba.fastjson.parser.Feature; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.sap.conn.jco.*; |
| | | import org.aspectj.lang.ProceedingJoinPoint; |
| | | import org.aspectj.lang.annotation.Around; |
| | | import org.aspectj.lang.annotation.Aspect; |
| | |
| | | break; |
| | | case WMS: |
| | | dto.setRequestMethod("Webservice"); |
| | | if (result instanceof Map) { |
| | | Map<String, Object> map = (Map<String, Object>) result; |
| | | dto.setResponseCode(map.get("ztype").toString()); |
| | | dto.setResponseMessage(map.get("zmess").toString()); |
| | | dto.setRequestBody(map.get("importParameters") == null ? null : map.get("importParameters").toString()); |
| | | dto.setResponseBody(parseSAPResponseResult(map.get("result"))); |
| | | } |
| | | break; |
| | | case FEI_SHU: |
| | | dto.setRequestMethod("Http"); |
| | |
| | | } catch (JsonProcessingException e) { |
| | | throw new JeecgBootException(e); |
| | | } |
| | | } else if (result instanceof String) { |
| | | return result.toString(); |
| | | } else { |
| | | try { |
| | | String json = objectMapper.writeValueAsString(result); |
| | |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.modules.andon.dto.AndonButtonDTO; |
| | | import org.jeecg.modules.andon.dto.AndonOrdeDto; |
| | | import org.jeecg.modules.andon.entity.AndonButtonConfig; |
| | | import org.jeecg.modules.andon.service.IAndonButtonConfigService; |
| | | import org.jeecg.modules.andon.service.impl.AndonOrderServiceImpl; |
| | |
| | | */ |
| | | @ApiOperation(value = "å®ç¯åèµ·-å页å表æ¥è¯¢", notes = "å®ç¯åèµ·-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/queryUserAndonCallList") |
| | | public Result<List<AndonButtonDTO>> queryUserAndonCallList(@RequestParam("factoryId") String factoryId) { |
| | | List<AndonButtonDTO> list = andonButtonConfigService.queryUserAndonCallList(factoryId); |
| | | public Result<List<AndonOrdeDto>> queryUserAndonCallList(@RequestParam("factoryId") String factoryId, @RequestParam("orderStatus") String orderStatus) { |
| | | List<AndonOrdeDto> list = andonButtonConfigService.queryUserAndonCallList(factoryId,orderStatus); |
| | | return Result.OK(list); |
| | | } |
| | | |
| | |
| | | */ |
| | | @ApiOperation(value = "å®ç¯ååº-å页å表æ¥è¯¢", notes = "å®ç¯ååº-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/queryUserAndonRespondList") |
| | | public Result<List<AndonButtonDTO>> queryUserAndonRespondList(@RequestParam("factoryId") String factoryId) { |
| | | List<AndonButtonDTO> list = andonButtonConfigService.queryUserAndonRespondList(factoryId); |
| | | public Result<List<AndonOrdeDto>> queryUserAndonRespondList(@RequestParam("factoryId") String factoryId, @RequestParam("orderStatus") String orderStatus) { |
| | | List<AndonOrdeDto> list = andonButtonConfigService.queryUserAndonRespondList(factoryId,orderStatus); |
| | | return Result.OK(list); |
| | | } |
| | | |
| | |
| | | */ |
| | | @ApiOperation(value = "å®ç¯ååº-å页å表æ¥è¯¢", notes = "å®ç¯ååº-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/queryUserAndonHandelList") |
| | | public Result<List<AndonButtonDTO>> queryUserAndonHandelList(@RequestParam("factoryId") String factoryId) { |
| | | List<AndonButtonDTO> list = andonButtonConfigService.queryUserAndonHandelList(factoryId); |
| | | public Result<List<AndonOrdeDto>> queryUserAndonHandelList(@RequestParam("factoryId") String factoryId ,@RequestParam("orderStatus") String orderStatus) { |
| | | List<AndonOrdeDto> list = andonButtonConfigService.queryUserAndonHandelList(factoryId,orderStatus); |
| | | return Result.OK(list); |
| | | } |
| | | /** |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.andon.dto.AndonOrdeDto; |
| | | import org.jeecg.modules.andon.entity.AndonOrder; |
| | | import org.jeecg.modules.andon.service.IAndonOrderService; |
| | | import org.jeecg.modules.andon.service.IAndonResponseConfigService; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.sql.Date; |
| | | import java.util.Arrays; |
| | | |
| | | /** |
| | |
| | | private IAndonOrderService andonOrderService; |
| | | |
| | | |
| | | @Autowired |
| | | private IAndonResponseConfigService andonResponseConfigService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | |
| | | @ApiOperation(value = "å®ç¯å·¥å-æ·»å ", notes = "å®ç¯å·¥å-æ·»å ") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody AndonOrder andonOrder) { |
| | | // æ ¹æ®button_idæ¥è¯¢å¯¹åºç产线ID |
| | | if (andonOrder.getButtonId() != null) { |
| | | String productionLineId = andonResponseConfigService.getProductionLineIdByButtonId(andonOrder.getButtonId()); |
| | | if (productionLineId != null) { |
| | | andonOrder.setFactoryId(productionLineId); |
| | | } |
| | | } |
| | | andonOrderService.save(andonOrder); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param andonOrder |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å®ç¯APPå·¥å-æ·»å ") |
| | | @ApiOperation(value = "å®ç¯APPå·¥å-æ·»å ", notes = "å®ç¯APPå·¥å-æ·»å ") |
| | | @PostMapping(value = "/app/add") |
| | | public Result<String> appAdd(@RequestBody AndonOrder andonOrder) { |
| | | // æ ¹æ®button_idæ¥è¯¢å¯¹åºç产线ID |
| | | andonOrder.setAndonLevel("1"); |
| | | andonOrder.setFactoryId(andonOrder.getFactoryId()); |
| | | andonOrder.setOperator(andonOrder.getOperator()); |
| | | String Responder = andonResponseConfigService.getResponderByButtonId(andonOrder.getButtonId(),andonOrder.getFactoryId()); |
| | | andonOrder.setResponder(Responder); |
| | | andonOrder.setProcessor(Responder); |
| | | andonOrder.setOperateTime(new java.sql.Timestamp(System.currentTimeMillis())); |
| | | andonOrderService.save(andonOrder); |
| | | // å建AndonOrderDto对象并å¤å¶å±æ§ |
| | | AndonOrdeDto andonOrderDto = new AndonOrdeDto(); |
| | | // å¤å¶å¿
è¦å±æ§å°Dto对象 |
| | | andonOrderDto.setId(andonOrder.getId()); |
| | | andonOrderDto.setButtonId(andonOrder.getButtonId()); |
| | | andonOrderDto.setFactoryId(andonOrder.getFactoryId()); |
| | | andonOrderDto.setOperator(andonOrder.getOperator()); |
| | | andonOrderDto.setResponder(andonOrder.getResponder()); |
| | | andonOrderDto.setProcessor(andonOrder.getProcessor()); |
| | | andonOrderDto.setAndonLevel(andonOrder.getAndonLevel()); |
| | | andonOrderDto.setOperateTime(andonOrder.getOperateTime()); |
| | | andonResponseConfigService.sendAndonNotification(andonOrderDto); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * APPå®ç¯ååºæä½ |
| | | * |
| | | * @param orderId |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "APPå®ç¯ååºæä½", notes = "APPå®ç¯ååºæä½") |
| | | @GetMapping(value = "/AndonRespond") |
| | | public Result<String> AndonRespond(@RequestParam("orderId") String orderId) { |
| | | AndonOrder andonOrder = andonOrderService.getById(orderId); |
| | | public Result<String> AndonRespond(@RequestParam("id") String id) { |
| | | AndonOrder andonOrder = andonOrderService.getById(id); |
| | | andonOrder.setOrderStatus("2"); |
| | | andonOrderService.updateById(andonOrder); |
| | | return Result.OK("ååºæåï¼"); |
| | |
| | | |
| | | /** |
| | | * APPå®ç¯å¤çæä½ |
| | | * |
| | | * |
| | | * @return |
| | | */ |
| | |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.modules.andon.dto.AndonButtonDTO; |
| | | import org.jeecg.modules.andon.dto.AndonOrdeDto; |
| | | import org.jeecg.modules.andon.entity.AndonResponseConfig; |
| | | import org.jeecg.modules.andon.service.IAndonResponseConfigService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @AutoLog(value = "å®ç¯å·¥å-åéé£ä¹¦æ¶æ¯") |
| | | @ApiOperation(value = "å®ç¯å·¥å-åéé£ä¹¦æ¶æ¯", notes = "å®ç¯å·¥å-åéé£ä¹¦æ¶æ¯") |
| | | @PostMapping(value = "/sendMessage") |
| | | public Result<String> sendMessage(@RequestBody AndonButtonDTO andonButtonDTO) { |
| | | public Result<String> sendMessage(@RequestBody AndonOrdeDto andonButtonDTO) { |
| | | try { |
| | | andonButtonDTO.setBlinkingFlag(1); |
| | | // è°ç¨æå¡å±å¤çä¸å¡é»è¾ |
| | | andonResponseConfigService.sendAndonNotification(andonButtonDTO); |
| | | return Result.OK("æ·»å æåï¼"); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.andon.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | @Data |
| | | public class AndonOrdeDto { |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å建人*/ |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /**åå»ºæ¥æ*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "åå»ºæ¥æ") |
| | | private Date createTime; |
| | | /**æ´æ°äºº*/ |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /**æ´æ°æ¥æ*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "æ´æ°æ¥æ") |
| | | private Date updateTime; |
| | | /**å 餿 è®°*/ |
| | | |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | /**产线ID*/ |
| | | |
| | | @ApiModelProperty(value = "产线ID") |
| | | @Dict(dictTable = "base_factory", dicCode = "id", dicText = "factory_name") |
| | | private String factoryId; |
| | | /**å®ç¯ç±»å*/ |
| | | |
| | | @ApiModelProperty(value = "å®ç¯ç±»å") |
| | | @Dict(dictTable = "andon_button_config", dicCode = "id", dicText = "button_name") |
| | | private String buttonId; |
| | | /**å®ç¯äºº*/ |
| | | |
| | | @Dict(dictTable = "sys_user", dicCode = "id", dicText = "username") |
| | | @ApiModelProperty(value = "å®ç¯äºº") |
| | | private String operator; |
| | | /**å®ç¯æ¶é´*/ |
| | | |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "å®ç¯æ¶é´") |
| | | private Date operateTime; |
| | | /**å®ç¯ç级*/ |
| | | |
| | | @Dict(dicCode = "andon_level") |
| | | @ApiModelProperty(value = "å®ç¯ç级") |
| | | private String andonLevel; |
| | | /**ååºäºº*/ |
| | | @Dict(dictTable = "sys_user", dicCode = "id", dicText = "username") |
| | | |
| | | @ApiModelProperty(value = "ååºäºº") |
| | | private String responder; |
| | | /**ååºæ¶é´*/ |
| | | |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "ååºæ¶é´") |
| | | private Date responseTime; |
| | | /**å¤ç人*/ |
| | | @Dict(dictTable = "sys_user", dicCode = "id", dicText = "username") |
| | | |
| | | @ApiModelProperty(value = "å¤ç人") |
| | | private String processor; |
| | | /**å¤ç宿æ¶é´*/ |
| | | |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "å¤ç宿æ¶é´") |
| | | private Date processTime; |
| | | /**å®ç¯ç¶æ*/ |
| | | |
| | | @Dict(dicCode = "order_status") |
| | | @ApiModelProperty(value = "å®ç¯ç¶æ") |
| | | private String orderStatus; |
| | | /**é®é¢æè¿°*/ |
| | | |
| | | @ApiModelProperty(value = "é®é¢æè¿°") |
| | | private String problemDescreption; |
| | | /**å¤çç»ææè¿°*/ |
| | | |
| | | @ApiModelProperty(value = "å¤çç»ææè¿°") |
| | | private String resolutionDescreption; |
| | | @ApiModelProperty(value = "ä¸çº§ååºäººopenId") |
| | | private String responderOpenId; |
| | | |
| | | @ApiModelProperty(value = "äºçº§ååºäººopenId") |
| | | private String secondResponderOpenId; |
| | | |
| | | @ApiModelProperty(value = "ä¸çº§ååºäººopenId") |
| | | private String thirdResponderOpenId; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "ä¸çº§ååºäºº") |
| | | private String thirdResponder; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "äºçº§ååºäºº") |
| | | private String secondResponder; |
| | | /**产线åç§°*/ |
| | | @ApiModelProperty(value = "产线åç§°") |
| | | private String factoryName; |
| | | |
| | | /**产线åç§°*/ |
| | | @ApiModelProperty(value = "å·¥ååç§°") |
| | | private String parentFactoryName; |
| | | |
| | | /**ä¸çº§ååºæ¶é¿*/ |
| | | @ApiModelProperty(value = "ä¸çº§ååºæ¶é¿") |
| | | private Integer upgradeResponseDuration; |
| | | |
| | | |
| | | /**æé®åç§°*/ |
| | | @ApiModelProperty(value = "æé®åç§°") |
| | | private String buttonName; |
| | | |
| | | |
| | | |
| | | /** |
| | | * å®ç¯äººåç§° |
| | | */ |
| | | @ApiModelProperty(value = "å®ç¯äººåç§°") |
| | | private String operatorName; |
| | | |
| | | /**äºçº§ååºæ¶é¿*/ |
| | | @ApiModelProperty(value = "äºçº§ååºæ¶é¿") |
| | | private Integer secondUpgradeResponseDuration; |
| | | |
| | | /**ä¸çº§çº§ååºæ¶é¿*/ |
| | | @ApiModelProperty(value = "ä¸çº§ååºæ¶é¿") |
| | | private Integer thirdUpgradeResponseDuration; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.andon.dto.AndonButtonDTO; |
| | | import org.jeecg.modules.andon.dto.AndonOrdeDto; |
| | | import org.jeecg.modules.andon.entity.AndonButtonConfig; |
| | | |
| | | import java.util.List; |
| | |
| | | * @param factoryId |
| | | * @return |
| | | */ |
| | | List<AndonButtonDTO> queryUserAndonCallList(String factoryId); |
| | | List<AndonOrdeDto> queryUserAndonCallList(String factoryId, String orderStatus); |
| | | |
| | | /** |
| | | * ååºå®ç¯å表 |
| | | * @param factoryId |
| | | * @return |
| | | */ |
| | | List<AndonButtonDTO> queryUserAndonRespondList(String factoryId); |
| | | |
| | | List<AndonOrdeDto> queryUserAndonRespondList(String factoryId, String orderStatus); |
| | | |
| | | /** |
| | | * å¤çå®ç¯å表 |
| | | * @param factoryId |
| | | * @return |
| | | */ |
| | | List<AndonButtonDTO> queryUserAndonHandelList(String factoryId); |
| | | List<AndonOrdeDto> queryUserAndonHandelList(String factoryId, String orderStatus); |
| | | |
| | | } |
| | | |
| | |
| | | where arc.factory_id=#{factoryId}; |
| | | </select> |
| | | |
| | | <select id="queryUserAndonCallList" resultType="org.jeecg.modules.andon.dto.AndonButtonDTO"> |
| | | select arc.id, |
| | | abc.id as buttonId, |
| | | abc.button_name as buttonName, |
| | | abc.button_code as buttonCode, |
| | | (select count(1) |
| | | from andon_order ao |
| | | where ao.button_id = arc.button_id |
| | | and ao.factory_id = arc.factory_id |
| | | and ao.order_status = '1') as blinkingFlag, |
| | | STUFF((SELECT ',' + CAST (ao.id AS VARCHAR) |
| | | FROM andon_order ao |
| | | WHERE ao.button_id = arc.button_id |
| | | and ao.factory_id = arc.factory_id |
| | | and ao.order_status = '1' |
| | | FOR XML PATH ('')), 1, 1, '') as orderIds, |
| | | bf.factory_name as factoryName, |
| | | parent_bf.factory_name as parentFactoryName, |
| | | abc.upgrade_response_duration as upgradeResponseDuration, |
| | | abc.second_upgrade_response_duration as secondUpgradeResponseDuration, |
| | | arc.firster_responder as responder, |
| | | arc.second_responder, |
| | | arc.third_responder, |
| | | STUFF((SELECT ',' + ao.order_status |
| | | FROM andon_order ao |
| | | WHERE ao.button_id = arc.button_id |
| | | and ao.factory_id = arc.factory_id |
| | | and ao.order_status = '1' |
| | | FOR XML PATH ('')), 1, 1, '') as orderStatus |
| | | from andon_response_config arc |
| | | left join andon_button_config abc |
| | | on arc.button_id = abc.id |
| | | left join base_factory bf on arc.factory_id = bf.id |
| | | left join base_factory parent_bf on bf.parent_id = parent_bf.id |
| | | where arc.factory_id=#{factoryId} |
| | | and (select count (1) |
| | | from andon_order ao |
| | | where ao.button_id = arc.button_id |
| | | and ao.factory_id = arc.factory_id |
| | | and ao.order_status = '1') = 1 |
| | | <select id="queryUserAndonCallList" resultType="org.jeecg.modules.andon.dto.AndonOrdeDto"> |
| | | SELECT |
| | | ao.*, |
| | | bf.factory_name as factoryName, |
| | | parent_bf.factory_name as parentFactoryName, |
| | | abc.button_name as buttonName, |
| | | abc.upgrade_response_duration as upgradeResponseDuration, |
| | | abc.second_upgrade_response_duration as secondUpgradeResponseDuration, |
| | | su.username as operatorName |
| | | FROM andon_order ao |
| | | LEFT JOIN base_factory bf ON ao.factory_id = bf.id |
| | | LEFT JOIN base_factory parent_bf ON bf.parent_id = parent_bf.id |
| | | LEFT JOIN andon_button_config abc ON ao.button_id = abc.id |
| | | LEFT JOIN sys_user su ON ao.operator = su.id |
| | | WHERE ao.factory_id = #{factoryId} |
| | | AND ao.del_flag = 0 |
| | | AND ao.order_status = #{orderStatus} |
| | | </select> |
| | | |
| | | <select id="queryUserAndonRespondList" resultType="org.jeecg.modules.andon.dto.AndonButtonDTO"> |
| | | <select id="queryUserAndonRespondList" resultType="org.jeecg.modules.andon.dto.AndonOrdeDto"> |
| | | select arc.id, |
| | | abc.id as buttonId, |
| | | abc.button_name as buttonName, |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.andon.dto.AndonButtonDTO; |
| | | import org.jeecg.modules.andon.dto.AndonOrdeDto; |
| | | import org.jeecg.modules.andon.entity.AndonButtonConfig; |
| | | |
| | | import java.util.List; |
| | |
| | | * @param factoryId |
| | | * @return |
| | | */ |
| | | List<AndonButtonDTO> queryUserAndonCallList(String factoryId); |
| | | List<AndonOrdeDto> queryUserAndonCallList(String factoryId, String orderStatus); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¨æ·åèµ·å®ç¯ååºå表 |
| | | * @param factoryId |
| | | * @return |
| | | */ |
| | | List<AndonButtonDTO> queryUserAndonRespondList(String factoryId); |
| | | |
| | | List<AndonOrdeDto> queryUserAndonRespondList(String factoryId,String orderStatus); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¨æ·åèµ·å®ç¯å¤çå表 |
| | | * @param factoryId |
| | | * @return |
| | | */ |
| | | List<AndonButtonDTO> queryUserAndonHandelList(String factoryId); |
| | | List<AndonOrdeDto> queryUserAndonHandelList(String factoryId,String orderStatus); |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.andon.dto.AndonButtonDTO; |
| | | import org.jeecg.modules.andon.dto.AndonOrdeDto; |
| | | import org.jeecg.modules.andon.entity.AndonOrder; |
| | | import org.jeecg.modules.andon.entity.AndonResponseConfig; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®button_idè·å产线ID |
| | | * @param buttonId |
| | | * @return |
| | | */ |
| | | String getProductionLineIdByButtonId(String buttonId); |
| | | |
| | | /** |
| | | * æ ¹æ®button_idè·åååºäºº |
| | | * @param buttonId |
| | | * @return |
| | | */ |
| | | String getResponderByButtonId(String buttonId,String factoryId); |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®button_idåfactory_idè·åååºé
置对象 |
| | | * @param buttonId æé®ID |
| | | * @param factoryId å·¥å/产线ID |
| | | * @return AndonResponseConfig ååºé
置对象 |
| | | */ |
| | | AndonResponseConfig getResponseConfigByButtonIdAndFactoryId(String buttonId, String factoryId); |
| | | |
| | | |
| | | /** |
| | | * åéå®ç¯éç¥ |
| | | * @param andonButtonDTO å®ç¯æé®DTO |
| | | * @return ç»æ |
| | | */ |
| | | void sendAndonNotification(AndonButtonDTO andonButtonDTO); |
| | | void sendAndonNotification(AndonOrdeDto andonButtonDTO); |
| | | } |
| | |
| | | package org.jeecg.modules.andon.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import liquibase.pro.packaged.S; |
| | | import org.jeecg.modules.andon.dto.AndonButtonDTO; |
| | | import org.jeecg.modules.andon.dto.AndonOrdeDto; |
| | | import org.jeecg.modules.andon.entity.AndonButtonConfig; |
| | | import org.jeecg.modules.andon.mapper.AndonButtonConfigMapper; |
| | | import org.jeecg.modules.andon.service.IAndonButtonConfigService; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<AndonButtonDTO> queryUserAndonCallList(String factoryId) { |
| | | return baseMapper.queryUserAndonCallList(factoryId); |
| | | public List<AndonOrdeDto> queryUserAndonCallList(String factoryId, String orderStatus) { |
| | | return baseMapper.queryUserAndonCallList(factoryId, orderStatus); |
| | | } |
| | | |
| | | @Override |
| | | public List<AndonButtonDTO> queryUserAndonRespondList(String factoryId) { |
| | | return baseMapper.queryUserAndonRespondList(factoryId); |
| | | public List<AndonOrdeDto> queryUserAndonRespondList(String factoryId, String orderStatus) { |
| | | return baseMapper.queryUserAndonRespondList(factoryId, orderStatus); |
| | | } |
| | | |
| | | @Override |
| | | public List<AndonButtonDTO> queryUserAndonHandelList(String factoryId) { |
| | | return baseMapper.queryUserAndonHandelList(factoryId); |
| | | public List<AndonOrdeDto> queryUserAndonHandelList(String factoryId, String orderStatus) { |
| | | return baseMapper.queryUserAndonHandelList(factoryId, orderStatus); |
| | | } |
| | | |
| | | |
| | |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.andon.dto.AndonButtonDTO; |
| | | import org.jeecg.modules.andon.dto.AndonOrdeDto; |
| | | import org.jeecg.modules.andon.entity.AndonButtonConfig; |
| | | import org.jeecg.modules.andon.entity.AndonOrder; |
| | | import org.jeecg.modules.andon.entity.AndonResponseConfig; |
| | |
| | | return baseMapper.getAndonResponseConfigByFactoryIdAndButtonId(factoryId, buttonId); |
| | | } |
| | | |
| | | @Override |
| | | public String getProductionLineIdByButtonId(String buttonId) { |
| | | QueryWrapper<AndonResponseConfig> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("button_id", buttonId); |
| | | AndonResponseConfig config = this.getOne(queryWrapper); |
| | | return config != null ? config.getFactoryId() : null; |
| | | } |
| | | |
| | | @Override |
| | | public String getResponderByButtonId(String buttonId,String factoryId) { |
| | | QueryWrapper<AndonResponseConfig> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("button_id", buttonId); |
| | | queryWrapper.eq("factory_id", factoryId); // å设factory_id对åºäº§çº¿ID |
| | | AndonResponseConfig config = this.getOne(queryWrapper, false); |
| | | return config != null ? config.getFirsterResponder() : null; |
| | | } |
| | | |
| | | @Override |
| | | public AndonResponseConfig getResponseConfigByButtonIdAndFactoryId(String buttonId, String factoryId) { |
| | | QueryWrapper<AndonResponseConfig> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("button_id", buttonId); |
| | | queryWrapper.eq("factory_id", factoryId); |
| | | // 使ç¨falseåæ°ï¼å½æ¥è¯¢å°å¤æ¡è®°å½æ¶ä¸ä¼æåºå¼å¸¸ï¼èæ¯è¿åç¬¬ä¸æ¡ |
| | | return this.getOne(queryWrapper, false); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void sendAndonNotification(AndonButtonDTO andonButtonDTO) { |
| | | public void sendAndonNotification(AndonOrdeDto andonButtonDTO) { |
| | | /** |
| | | * 1. éªè¯å·¥åç¶æ |
| | | */ |
| | |
| | | log.warn("请æ±åæ°ä¸ºç©º"); |
| | | throw new IllegalArgumentException("请æ±åæ°ä¸è½ä¸ºç©º"); |
| | | } |
| | | /** |
| | | * 设置å®ç¯äºº |
| | | */ |
| | | |
| | | /** |
| | | * 2. è·åååºé
ç½® |
| | | */ |
| | | AndonResponseConfig andonResponseConfig = this.getById(andonButtonDTO.getId()); |
| | | AndonResponseConfig andonResponseConfig = getResponseConfigByButtonIdAndFactoryId(andonButtonDTO.getButtonId(), andonButtonDTO.getFactoryId()); |
| | | |
| | | AndonOrder andonOrder = andonOrderService.getById(andonButtonDTO.getOrderIds()); |
| | | AndonOrder andonOrder = andonOrderService.getById(andonButtonDTO.getId()); |
| | | if (andonOrder == null) { |
| | | log.warn("æªæ¾å°ID为[{}]çå®ç¯è®¢å"); |
| | | throw new IllegalArgumentException("æªæ¾å°å¯¹åºçå®ç¯è®¢å"); |
| | |
| | | List<String> list = Arrays.asList(productionIds.split(",")); |
| | | LambdaQueryWrapper<Factory> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(Factory::getDelFlag, CommonConstant.DEL_FLAG_0); |
| | | // queryWrapper.eq(Factory::getFactoryCategory, "PRODUCTION_LINE"); |
| | | queryWrapper.eq(Factory::getFactoryCategory, "3"); |
| | | queryWrapper.in(Factory::getId, list); |
| | | queryWrapper.orderByAsc(Factory::getSorter); |
| | | return super.list(queryWrapper); |
| | |
| | | import org.jeecg.common.util.PasswordUtil; |
| | | import org.jeecg.common.util.RestUtil; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.andon.dto.AndonButtonDTO; |
| | | import org.jeecg.modules.andon.dto.AndonOrdeDto; |
| | | import org.jeecg.modules.mes.entity.FeishuUser; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | |
| | | * 2. ä¸çº§ååºæ¶é¿åæ£æ¥ç¶æï¼æªå¤çååéäºçº§ |
| | | * 3. äºçº§ååºæ¶é¿åæ£æ¥ç¶æï¼æªå¤çååéä¸çº§ |
| | | */ |
| | | public boolean sendAndonNotification(String accessToken, AndonButtonDTO andonOrde) { |
| | | public boolean sendAndonNotification(String accessToken, AndonOrdeDto andonOrde) { |
| | | try { |
| | | String currentTime = sdf.format(new Date()); |
| | | log.info("ã{}ã触åä¸çº§ååºï¼å级ååºï¼ï¼å®ç¯ID: {}", currentTime, andonOrde.getId()); |
| | |
| | | * åéæå®çº§å«çéç¥ |
| | | * @param level 1-ä¸çº§ï¼2-äºçº§ï¼3-ä¸çº§ |
| | | */ |
| | | private boolean sendLevelNotification(String accessToken, AndonButtonDTO andonOrde, int level) { |
| | | private boolean sendLevelNotification(String accessToken, AndonOrdeDto andonOrde, int level) { |
| | | try { |
| | | String levelDesc = getLevelDesc(level); |
| | | String openId = getResponderOpenId(andonOrde, level); |
| | |
| | | * @param currentLevel å½åçº§å« |
| | | * @param delayMinutes å»¶è¿åéæ°ï¼ç±å½å级å«ååºæ¶é¿å³å®ï¼ |
| | | */ |
| | | private void scheduleNextLevelNotification(String accessToken, AndonButtonDTO andonOrde, int currentLevel, int delayMinutes) { |
| | | private void scheduleNextLevelNotification(String accessToken, AndonOrdeDto andonOrde, int currentLevel, int delayMinutes) { |
| | | int nextLevel = currentLevel + 1; |
| | | if (nextLevel > 3) { |
| | | log.info("å·²å°è¾¾æé«çº§å«éç¥ï¼æ éç»§ç»è°åº¦ï¼å®ç¯ID: {}", andonOrde.getId()); |
| | |
| | | /** |
| | | * æå»ºéç¥å
容ï¼ä¼ååéç¬¦ï¼æåå¯è¯»æ§ï¼ |
| | | */ |
| | | private String buildNotificationContent(AndonButtonDTO andonOrde, int level) { |
| | | private String buildNotificationContent(AndonOrdeDto andonOrde, int level) { |
| | | // è·åå·¥ååç§°å产线åç§°ï¼å空å¼ä¿æ¤ |
| | | String parentFactoryName = andonOrde.getParentFactoryName() != null ? andonOrde.getParentFactoryName() : "æªç¥å·¥å"; |
| | | String factoryName = andonOrde.getFactoryName() != null ? andonOrde.getFactoryName() : "æªç¥äº§çº¿"; |
| | |
| | | /** |
| | | * éªè¯éç¥ç¸å
³åæ° |
| | | */ |
| | | private boolean validateNotificationParams(AndonButtonDTO andonOrde) { |
| | | private boolean validateNotificationParams(AndonOrdeDto andonOrde) { |
| | | if (andonOrde == null) { |
| | | log.error("å®ç¯è®¢åä¿¡æ¯ä¸ºç©º"); |
| | | return false; |
| | |
| | | } |
| | | |
| | | // å·¥å
·æ¹æ³ï¼è·åååºäººopenId |
| | | private String getResponderOpenId(AndonButtonDTO andonOrde, int level) { |
| | | private String getResponderOpenId(AndonOrdeDto andonOrde, int level) { |
| | | switch (level) { |
| | | case 1: return andonOrde.getResponderOpenId(); |
| | | case 2: return andonOrde.getSecondResponderOpenId(); |
| | |
| | | } |
| | | |
| | | // å·¥å
·æ¹æ³ï¼è·åååºäººåç§° |
| | | private String getResponderName(AndonButtonDTO andonOrde, int level) { |
| | | private String getResponderName(AndonOrdeDto andonOrde, int level) { |
| | | String name = null; |
| | | switch (level) { |
| | | case 1: |
| | |
| | | } |
| | | |
| | | // å·¥å
·æ¹æ³ï¼è·åååºæ¶é¿ï¼ä¸çº§=äºçº§å»¶è¿ï¼äºçº§=ä¸çº§å»¶è¿ï¼ |
| | | private int getResponseDuration(AndonButtonDTO andonOrde, int level) { |
| | | private int getResponseDuration(AndonOrdeDto andonOrde, int level) { |
| | | int duration = 0; |
| | | switch (level) { |
| | | case 1: |
| | |
| | | } |
| | | |
| | | // å·¥å
·æ¹æ³ï¼å¤ææå®çº§å«ååºäººæ¯å¦ææ |
| | | private boolean hasValidResponder(AndonButtonDTO andonOrde, int level) { |
| | | private boolean hasValidResponder(AndonOrdeDto andonOrde, int level) { |
| | | String openId = getResponderOpenId(andonOrde, level); |
| | | return openId != null && !openId.isEmpty(); |
| | | } |
| | |
| | | import javax.xml.ws.WebServiceClient; |
| | | import javax.xml.ws.WebServiceFeature; |
| | | import javax.xml.ws.Service; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.jeecg.modules.wms.service.WebServiceSoap; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | * Generated source version: 3.5.5 |
| | | * |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | @WebServiceClient(name = "WebService", |
| | | wsdlLocation = "classpath:/wsdl/WebService.asmx.wsdl", |
| | |
| | | try { |
| | | url = new URL("classpath:/wsdl/WebService.asmx.wsdl"); |
| | | } catch (MalformedURLException e) { |
| | | java.util.logging.Logger.getLogger(WMSWebService.class.getName()) |
| | | .log(java.util.logging.Level.INFO, |
| | | "Can not initialize the default wsdl from {0}", "classpath:/wsdl/WebService.asmx.wsdl"); |
| | | log.error("Can not initialize the default wsdl from {}", "classpath:/wsdl/WebService.asmx.wsdl"); |
| | | } |
| | | WSDL_LOCATION = url; |
| | | } |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.cxf.endpoint.Client; |
| | | import org.apache.cxf.frontend.ClientProxy; |
| | | import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; |
| | | import org.apache.cxf.transport.http.HTTPConduit; |
| | | import org.apache.cxf.transports.http.configuration.HTTPClientPolicy; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.modules.wms.WMSWebService; |
| | | import org.jeecg.modules.wms.dto.WSResponse; |
| | | import org.jeecg.modules.wms.request.ReceiveWMSScanItemList; |
| | | import org.jeecg.modules.wms.request.*; |
| | | import org.jeecg.modules.wms.service.MESWebServiceSoap; |
| | | import org.jeecg.modules.wms.service.WebServiceSoap; |
| | | import org.jeecg.modules.wms.service.WMSWebServiceClient; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Api(tags = "WMSéææµè¯") |
| | | @RestController |
| | | @RequestMapping("/wms/client") |
| | | @Slf4j |
| | | public class WMSTestController { |
| | | @Value("${webservice.url}") |
| | | private String url; |
| | | @Autowired |
| | | private WMSWebService webService; |
| | | private WMSWebServiceClient webServiceClient; |
| | | |
| | | private final static String localUrl = "http://localhost:9989/jeecg-boot/webservice/ReceiveWMSScanItemList?wsdl"; |
| | | private final static String localUrl = "http://localhost:9989/ebservice/ReceiveWMSScanItemList?wsdl"; |
| | | |
| | | |
| | | @ApiOperation(value = "WMSéææµè¯-æ¥æ¶WMSç§»åºç»æ", notes = "WMSéææµè¯-æ¥æ¶WMSç§»åºç»æ") |
| | | @PostMapping("/testReceiveWMSScanItemList") |
| | | public Result<?> testReceiveWMSScanItemList() { |
| | | public Result<?> testReceiveWMSScanItemList(@RequestBody List<WMSWebServiceSendItem> list) { |
| | | JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); |
| | | factory.setAddress(localUrl); |
| | | factory.setServiceClass(MESWebServiceSoap.class); |
| | | MESWebServiceSoap service = (MESWebServiceSoap) factory.create(); |
| | | ReceiveWMSScanItemList request = new ReceiveWMSScanItemList(); |
| | | request.setWmsWebServiceSendItemList(list); |
| | | WSResponse response = service.receiveWMSScanItemList(request); |
| | | return Result.ok(response); |
| | | } |
| | |
| | | // WebServiceSoap service = (WebServiceSoap) factory.create(); |
| | | // String response = service.helloWorld(); |
| | | // return Result.ok(response); |
| | | WebServiceSoap port = webService.getWebServiceSoap12(); |
| | | // WebServiceSoap port = webService.getWebServiceSoap(); |
| | | // 2. è·å CXF åºå± Client 对象 |
| | | Client client = ClientProxy.getClient(port); |
| | | // Client client = ClientProxy.getClient(port); |
| | | |
| | | // 3. è·å HTTPConduit 并设置è¶
æ¶ |
| | | HTTPConduit http = (HTTPConduit) client.getConduit(); |
| | | HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy(); |
| | | // HTTPConduit http = (HTTPConduit) client.getConduit(); |
| | | // HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy(); |
| | | // |
| | | // httpClientPolicy.setConnectionTimeout(10 * 1000); // è¿æ¥è¶
æ¶ 10 ç§ |
| | | // httpClientPolicy.setReceiveTimeout(300 * 1000); // 读åè¶
æ¶ 60 ç§ï¼éç¹ï¼ï¼ |
| | | |
| | | httpClientPolicy.setConnectionTimeout(10 * 1000); // è¿æ¥è¶
æ¶ 10 ç§ |
| | | httpClientPolicy.setReceiveTimeout(300 * 1000); // 读åè¶
æ¶ 60 ç§ï¼éç¹ï¼ï¼ |
| | | |
| | | http.setClient(httpClientPolicy); |
| | | String result = port.helloWorld(); |
| | | return Result.ok(result); |
| | | // http.setClient(httpClientPolicy); |
| | | Map<String, Object> stringObjectMap = webServiceClient.helloWorld(); |
| | | return Result.ok(stringObjectMap); |
| | | |
| | | } |
| | | |
| | | @ApiOperation(value = "WMSéææµè¯-ç©ææå¨", notes = "WMSéææµè¯-ç©ææå¨") |
| | | @PostMapping("/receiveReservation") |
| | | public Result<?> receiveReservation(@RequestBody WebReservationOrder request) { |
| | | Map<String, Object> stringObjectMap = webServiceClient.receiveReservation(request); |
| | | return Result.ok(stringObjectMap); |
| | | |
| | | } |
| | | |
| | | @ApiOperation(value = "WMSéææµè¯-ç§»åºç³è¯·", notes = "WMSéææµè¯-ç§»åºç³è¯·") |
| | | @PostMapping("/receiveMESScanItemList") |
| | | public Result<?> receiveMESScanItemList(@RequestBody List<WebServiceSendItem> webServiceSendItem) { |
| | | ArrayOfWebServiceSendItem request = new ArrayOfWebServiceSendItem(); |
| | | request.setWebServiceSendItem(webServiceSendItem); |
| | | Map<String, Object> stringObjectMap = webServiceClient.receiveMESScanItemList(request); |
| | | return Result.ok(stringObjectMap); |
| | | } |
| | | |
| | | @ApiOperation(value = "WMSéææµè¯-ç§»åºç³è¯·æ¤é", notes = "WMSéææµè¯-ç§»åºç³è¯·æ¤é") |
| | | @PostMapping("/deliOrderDelete") |
| | | public Result<?> deliOrderDelete(@RequestParam String sFactoryCode, @RequestParam String sStockRecord) { |
| | | Map<String, Object> stringObjectMap = webServiceClient.deliOrderDelete(sFactoryCode, sStockRecord); |
| | | return Result.ok(stringObjectMap); |
| | | } |
| | | |
| | | } |
| | |
| | | @Getter |
| | | @Setter |
| | | @XmlAccessorType(XmlAccessType.FIELD) |
| | | @XmlType(name = "WSResponse", propOrder = { |
| | | @XmlType(name = "WSResponse", propOrder = { |
| | | "errorCode", |
| | | "errorDesc" |
| | | }) |
| | | public class WSResponse { |
| | | |
| | | @XmlElement(name = "ErrorCode") |
| | | @XmlElement(name = "ErrorCode", namespace = "http://tempuri.org/") |
| | | protected String errorCode; |
| | | @XmlElement(name = "ErrorDesc") |
| | | @XmlElement(name = "ErrorDesc", namespace = "http://tempuri.org/") |
| | | protected String errorDesc; |
| | | } |
| | |
| | | }) |
| | | public class ArrayOfWebServiceSendItem { |
| | | |
| | | @XmlElement(name = "WebServiceSendItem", nillable = true) |
| | | @XmlElement(name = "WebServiceSendItem", nillable = true, namespace = "http://tempuri.org/") |
| | | protected List<WebServiceSendItem> webServiceSendItem; |
| | | |
| | | /** |
| | |
| | | return this.webServiceSendItem; |
| | | } |
| | | |
| | | public void setWebServiceSendItem(List<WebServiceSendItem> webServiceSendItem) { |
| | | this.webServiceSendItem = webServiceSendItem; |
| | | } |
| | | } |
| | |
| | | @Setter |
| | | public class ReceiveMESScanItemList { |
| | | |
| | | @XmlElement(name = "oMESScanItemList") |
| | | @XmlElement(name = "oMESScanItemList", namespace = "http://tempuri.org/") |
| | | protected ArrayOfWebServiceSendItem omesScanItemList; |
| | | } |
| | |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import javax.xml.bind.annotation.XmlAccessType; |
| | | import javax.xml.bind.annotation.XmlAccessorType; |
| | | import javax.xml.bind.annotation.XmlRootElement; |
| | | import javax.xml.bind.annotation.XmlType; |
| | | import javax.xml.bind.annotation.*; |
| | | |
| | | |
| | | /** |
| | |
| | | @Setter |
| | | public class ReceiveReservation { |
| | | |
| | | @XmlElement(name = "oWebReservationOrder") |
| | | protected WebReservationOrder oWebReservationOrder; |
| | | } |
| | |
| | | import javax.xml.bind.annotation.XmlAccessorType; |
| | | import javax.xml.bind.annotation.XmlElement; |
| | | import javax.xml.bind.annotation.XmlType; |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | |
| | | |
| | |
| | | }) |
| | | @Getter |
| | | @Setter |
| | | public class WebReservationOrder { |
| | | public class WebReservationOrder implements Serializable { |
| | | |
| | | @XmlElement(name = "FactoryCode") |
| | | @XmlElement(name = "FactoryCode", namespace = "http://tempuri.org/") |
| | | protected String factoryCode; |
| | | @XmlElement(name = "ReservationOrder") |
| | | @XmlElement(name = "ReservationOrder", namespace = "http://tempuri.org/") |
| | | protected String reservationOrder; |
| | | @XmlElement(name = "Total", required = true) |
| | | @XmlElement(name = "Total", required = true, namespace = "http://tempuri.org/") |
| | | protected BigDecimal total; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "WebReservationOrder{" + |
| | | "factoryCode='" + factoryCode + '\'' + |
| | | ", reservationOrder='" + reservationOrder + '\'' + |
| | | ", total=" + total + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | @Setter |
| | | public class WebServiceSendItem { |
| | | |
| | | @XmlElement(name = "FactoryCode") |
| | | @XmlElement(name = "FactoryCode", namespace = "http://tempuri.org/") |
| | | protected String factoryCode; |
| | | @XmlElement(name = "SkuCode") |
| | | @XmlElement(name = "SkuCode", namespace = "http://tempuri.org/") |
| | | protected String skuCode; |
| | | @XmlElement(name = "Align") |
| | | @XmlElement(name = "Align", namespace = "http://tempuri.org/") |
| | | protected String align; |
| | | @XmlElement(name = "Pallet") |
| | | @XmlElement(name = "Pallet", namespace = "http://tempuri.org/") |
| | | protected String pallet; |
| | | @XmlElement(name = "PackageNo") |
| | | @XmlElement(name = "PackageNo", namespace = "http://tempuri.org/") |
| | | protected String packageNo; |
| | | @XmlElement(name = "TrackLot") |
| | | @XmlElement(name = "TrackLot", namespace = "http://tempuri.org/") |
| | | protected long trackLot; |
| | | @XmlElement(name = "Series") |
| | | @XmlElement(name = "Series", namespace = "http://tempuri.org/") |
| | | protected long series; |
| | | @XmlElement(name = "MesStockID") |
| | | @XmlElement(name = "MesStockID", namespace = "http://tempuri.org/") |
| | | protected String mesStockID; |
| | | @XmlElement(name = "Quantity", required = true) |
| | | @XmlElement(name = "Quantity", required = true, namespace = "http://tempuri.org/") |
| | | protected BigDecimal quantity; |
| | | @XmlElement(name = "SapTrackLot") |
| | | @XmlElement(name = "SapTrackLot", namespace = "http://tempuri.org/") |
| | | protected String sapTrackLot; |
| | | @XmlElement(name = "Section") |
| | | @XmlElement(name = "Section", namespace = "http://tempuri.org/") |
| | | protected String section; |
| | | @XmlElement(name = "DestSection") |
| | | @XmlElement(name = "DestSection", namespace = "http://tempuri.org/") |
| | | protected String destSection; |
| | | @XmlElement(name = "SupplierCode") |
| | | @XmlElement(name = "SupplierCode", namespace = "http://tempuri.org/") |
| | | protected String supplierCode; |
| | | @XmlElement(name = "SupplierTrackLot") |
| | | @XmlElement(name = "SupplierTrackLot", namespace = "http://tempuri.org/") |
| | | protected String supplierTrackLot; |
| | | @XmlElement(name = "StageID") |
| | | @XmlElement(name = "StageID", namespace = "http://tempuri.org/") |
| | | protected String stageID; |
| | | @XmlElement(name = "Remark") |
| | | @XmlElement(name = "Remark", namespace = "http://tempuri.org/") |
| | | protected String remark; |
| | | @XmlElement(name = "OrderCode") |
| | | @XmlElement(name = "OrderCode", namespace = "http://tempuri.org/") |
| | | protected String orderCode; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.wms.service; |
| | | |
| | | import org.jeecg.modules.wms.request.ArrayOfWebServiceSendItem; |
| | | import org.jeecg.modules.wms.request.WebReservationOrder; |
| | | |
| | | import java.util.Map; |
| | | |
| | | public interface WMSWebServiceClient { |
| | | /** |
| | | * æµè¯è¿éæ¥å£ |
| | | * @return |
| | | */ |
| | | Map<String, Object> helloWorld(); |
| | | |
| | | /** |
| | | * ç©ææå¨ |
| | | * @param oWebReservationOrder |
| | | * @return |
| | | */ |
| | | Map<String, Object> receiveReservation(WebReservationOrder oWebReservationOrder); |
| | | |
| | | /** |
| | | * ç§»åºç³è¯· |
| | | * @param oMESScanItemList |
| | | * @return |
| | | */ |
| | | Map<String, Object> receiveMESScanItemList(ArrayOfWebServiceSendItem oMESScanItemList); |
| | | |
| | | /** |
| | | * æ¤éç§»åºç³è¯· |
| | | * @param sFactoryCode |
| | | * @param sStockRecord |
| | | * @return |
| | | */ |
| | | Map<String, Object> deliOrderDelete(String sFactoryCode, String sStockRecord); |
| | | } |
| | |
| | | WSResponse receiveMESScanItemList( |
| | | |
| | | @WebParam(name = "oMESScanItemList", targetNamespace = "http://tempuri.org/") |
| | | ArrayOfWebServiceSendItem oMESScanItemList |
| | | ArrayOfWebServiceSendItem omesScanItemList |
| | | ); |
| | | |
| | | @WebMethod(operationName = "DeliOrderDelete", action = "http://tempuri.org/DeliOrderDelete") |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.wms.service.impl; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.jeecg.common.aspect.annotation.ApiLog; |
| | | import org.jeecg.common.constant.ApiLogCategoryEnum; |
| | | import org.jeecg.modules.wms.WMSWebService; |
| | | import org.jeecg.modules.wms.dto.WSResponse; |
| | | import org.jeecg.modules.wms.request.ArrayOfWebServiceSendItem; |
| | | import org.jeecg.modules.wms.request.WebReservationOrder; |
| | | import org.jeecg.modules.wms.service.WMSWebServiceClient; |
| | | import org.jeecg.modules.wms.service.WebServiceSoap; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | @Slf4j |
| | | public class WMSWebServiceClientImpl implements WMSWebServiceClient { |
| | | @Autowired |
| | | private WMSWebService webService; |
| | | |
| | | @Override |
| | | @ApiLog(apiName = "WMSæµè¯è¿éæ¥å£(HelloWorld)", apiCategory = ApiLogCategoryEnum.WMS) |
| | | public Map<String, Object> helloWorld() { |
| | | Map<String, Object> resultMap = new HashMap<>(); |
| | | WebServiceSoap port = webService.getWebServiceSoap(); |
| | | String result = port.helloWorld(); |
| | | resultMap.put("zmess", "è¯·æ±æå"); |
| | | resultMap.put("ztype", 200); |
| | | resultMap.put("importParameters", null); |
| | | resultMap.put("result", result); |
| | | return resultMap; |
| | | } |
| | | |
| | | @Override |
| | | @ApiLog(apiName = "ç©ææå¨(receiveReservation)", apiCategory = ApiLogCategoryEnum.WMS) |
| | | public Map<String, Object> receiveReservation(WebReservationOrder oWebReservationOrder) { |
| | | Map<String, Object> resultMap = new HashMap<>(); |
| | | WebServiceSoap port = webService.getWebServiceSoap(); |
| | | WSResponse result = port.receiveReservation(oWebReservationOrder); |
| | | resultMap.put("zmess", "è¯·æ±æå"); |
| | | resultMap.put("ztype", 200); |
| | | resultMap.put("importParameters", oWebReservationOrder); |
| | | resultMap.put("result", result); |
| | | return resultMap; |
| | | } |
| | | |
| | | @Override |
| | | @ApiLog(apiName = "ç§»åºç³è¯·(receiveMESScanItemList)", apiCategory = ApiLogCategoryEnum.WMS) |
| | | public Map<String, Object> receiveMESScanItemList(ArrayOfWebServiceSendItem oMESScanItemList) { |
| | | Map<String, Object> resultMap = new HashMap<>(); |
| | | WebServiceSoap port = webService.getWebServiceSoap(); |
| | | WSResponse result = port.receiveMESScanItemList(oMESScanItemList); |
| | | resultMap.put("zmess", "è¯·æ±æå"); |
| | | resultMap.put("ztype", 200); |
| | | resultMap.put("importParameters", oMESScanItemList); |
| | | resultMap.put("result", result); |
| | | return resultMap; |
| | | } |
| | | |
| | | @Override |
| | | @ApiLog(apiName = "æ¤éç§»åºç³è¯·(deliOrderDelete)", apiCategory = ApiLogCategoryEnum.WMS) |
| | | public Map<String, Object> deliOrderDelete(String sFactoryCode, String sStockRecord) { |
| | | Map<String, Object> resultMap = new HashMap<>(); |
| | | WebServiceSoap port = webService.getWebServiceSoap(); |
| | | WSResponse result = port.deliOrderDelete(sFactoryCode, sStockRecord); |
| | | resultMap.put("zmess", "è¯·æ±æå"); |
| | | resultMap.put("ztype", 200); |
| | | resultMap.put("importParameters", sStockRecord); |
| | | resultMap.put("result", result); |
| | | return resultMap; |
| | | } |
| | | } |