烘房看板接口

highway
Yangwl 1 year ago
parent d59ebb0895
commit 4b36de1131

@ -32,6 +32,7 @@ public class WCSInterfaceController extends BaseController {
@Autowired
private IWCSInterfaceService wCInterfaceService;
/**
*
* WCS MES
@ -121,6 +122,19 @@ public class WCSInterfaceController extends BaseController {
return success(wCInterfaceService.dataBKTask(tables));
}
/**
*
* @param
*/
@PostMapping("/dryRoomData")
public AjaxResult getDryRoomData(@RequestBody BoardDTO boardDTO){
if(StringUtils.isBlank(boardDTO.getFactory())){
return error("[factory] is not null");
}
return success(wCInterfaceService.getDryRoomData(boardDTO));
}
public static void main(String args[]){
System.out.println(DateUtils.getDate());
}

@ -10,6 +10,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* Mapper
@ -48,4 +49,6 @@ public interface MesMapper {
void deleteBkDateByTable(@Param("startDate") String startDate, @Param("endDate")String endDate);
void deleteBkDate(@Param("table")String addMonthTable,@Param("startDate") String startDate, @Param("endDate")String endDate);
List<Map<String, String>> selectcxjList();
}

@ -33,4 +33,6 @@ public interface IWCSInterfaceService {
R dataClearTask(List<String> tables);
R dataBKTask(List<String> tables);
Map getDryRoomData(BoardDTO boardDTO);
}

@ -259,6 +259,8 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
return R.ok(true);
}
public void dateBKFunc(String poolName,List<String> tables){
DynamicDataSourceContextHolder.push(poolName);// 这是数据源的key
DateTimeFormatter ymdhms = DateTimeFormatter.ofPattern("yyyy-MM-dd");
@ -322,6 +324,17 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
return "保存成功条数:"+saveNum;
}
@Override
public Map getDryRoomData(BoardDTO boardDTO) {
DynamicDataSourceContextHolder.push("ds_"+boardDTO.getFactory());// 这是数据源的key
//成型机清单
Map map=new HashMap();
List<Map<String,String>> eqmapList = mesMapper.selectcxjList();
map.put("result",eqmapList);
return map;
}
public static void main(String args[]){
DateTimeFormatter ymdhms = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate today = LocalDate.now();

@ -161,6 +161,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select * FROM mes_material_transfer_result
where create_time >= #{startDate} and #{endDate}>create_time
</select>
<select id="selectcxjList" resultType="java.util.Map">
SELECT * FROM [dbo].[base_equipment] WHERE equipment_type_code='equ_type_cxj'
</select>
<delete id="deleteBkDateByTable">
delete from mes_material_transfer_result
where create_time >= #{startDate} and #{endDate}>create_time

Loading…
Cancel
Save