|
@@ -110,6 +110,29 @@ public class IndexController { ;
|
|
_new.setGtClientId(gtClientId);
|
|
_new.setGtClientId(gtClientId);
|
|
_new.setModifyDate(new Date());
|
|
_new.setModifyDate(new Date());
|
|
equipmentService.updateById(_new);
|
|
equipmentService.updateById(_new);
|
|
|
|
+ TEquipmentDesc equipmentDesc = equipmentDescService.getById(_new.getId());
|
|
|
|
+ if(StringUtils.isNotEmpty(equipmentVo.getBlueSugar())){
|
|
|
|
+ equipmentDesc.setBlueSugar(equipmentVo.getBlueSugar());
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(equipmentVo.getRedSugar())){
|
|
|
|
+ equipmentDesc.setRedSugar(equipmentVo.getRedSugar());
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(equipmentVo.getYellowSugar())){
|
|
|
|
+ equipmentDesc.setYellowSugar(equipmentVo.getYellowSugar());
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(equipmentVo.getWhiteSugar())){
|
|
|
|
+ equipmentDesc.setWhiteSugar(equipmentVo.getWhiteSugar());
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(equipmentVo.getWater())){
|
|
|
|
+ equipmentDesc.setWater(equipmentVo.getWater());
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(equipmentVo.getWasteWater())){
|
|
|
|
+ equipmentDesc.setWasteWater(equipmentVo.getWasteWater());
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(equipmentVo.getStick())){
|
|
|
|
+ equipmentDesc.setStick(equipmentVo.getStick());
|
|
|
|
+ }
|
|
|
|
+ equipmentDescService.updateById(equipmentDesc);
|
|
return JsonMessage.success("心跳成功");
|
|
return JsonMessage.success("心跳成功");
|
|
}
|
|
}
|
|
return JsonMessage.error("心跳失败");
|
|
return JsonMessage.error("心跳失败");
|
|
@@ -237,6 +260,9 @@ public class IndexController { ;
|
|
}
|
|
}
|
|
equipment.setEquimentType("MG320");
|
|
equipment.setEquimentType("MG320");
|
|
}
|
|
}
|
|
|
|
+ if(equipmentApply.getEquimentType().equals("MG330")){
|
|
|
|
+ equipment.setEquimentType("MG330");
|
|
|
|
+ }
|
|
equipmentService.updateById(equipment);
|
|
equipmentService.updateById(equipment);
|
|
// String data = com.alibaba.fastjson.JSON.toJSONString(equipment);
|
|
// String data = com.alibaba.fastjson.JSON.toJSONString(equipment);
|
|
try {
|
|
try {
|
|
@@ -289,6 +315,9 @@ public class IndexController { ;
|
|
}else {
|
|
}else {
|
|
equipment.setEquimentType(equimentType);
|
|
equipment.setEquimentType(equimentType);
|
|
}
|
|
}
|
|
|
|
+ if(equipmentApply.getEquimentType().equals("MG330")){
|
|
|
|
+ equipment.setEquimentType("MG330");
|
|
|
|
+ }
|
|
if(!StringUtils.isEmpty(equimentType)&&equimentType.equals("MG280")){
|
|
if(!StringUtils.isEmpty(equimentType)&&equimentType.equals("MG280")){
|
|
Long monthBegin = getMonthBegin(new Date());
|
|
Long monthBegin = getMonthBegin(new Date());
|
|
long time = new Date().getTime();
|
|
long time = new Date().getTime();
|
|
@@ -369,15 +398,15 @@ public class IndexController { ;
|
|
* @param id
|
|
* @param id
|
|
*/
|
|
*/
|
|
private void saveProduct(Long id) {
|
|
private void saveProduct(Long id) {
|
|
- String[] str = {"玫瑰精灵", "童心未泯", "五彩缤纷", "天雪恋舞", "水中芙蓉", "烈焰红唇", "美梦成真", "一见钟情", "幽兰爱恋", "心之守护",
|
|
|
|
- "夏日爱恋", "冰美人", "国色天香", "赤子之心", "海洋之心", "水晶之恋", "彩色精灵", "小棉袄"};
|
|
|
|
|
|
+ String[] str = {"玫瑰精灵-A01", "童心未泯-A02", "五彩缤纷-A03", "天雪恋舞-A04", "水中芙蓉-A05", "烈焰红唇-A06", "美梦成真-A07", "一见钟情-A08", "幽兰爱恋-A09", "心之守护-A10",
|
|
|
|
+ "夏日爱恋-A11", "冰美人-A12", "国色天香-A13", "赤子之心-A14", "海洋之心-A15", "水晶之恋-A16", "彩色精灵-A17", "小棉袄-A18"};
|
|
|
|
|
|
for (int i = 0; i < str.length; i++) {
|
|
for (int i = 0; i < str.length; i++) {
|
|
TProduct product = new TProduct();
|
|
TProduct product = new TProduct();
|
|
- product.setCreateDate(new Date());
|
|
|
|
- product.setModifyDate(new Date());
|
|
|
|
product.setEquipmentId(id);
|
|
product.setEquipmentId(id);
|
|
- product.setProductName(str[i]);
|
|
|
|
|
|
+ String[] split = str[i].split("-");
|
|
|
|
+ product.setProductName(split[0]);
|
|
|
|
+ product.setNo(split[1]);
|
|
product.setRmbPrice(BigDecimal.ZERO);
|
|
product.setRmbPrice(BigDecimal.ZERO);
|
|
product.setCodePrice(BigDecimal.ZERO);
|
|
product.setCodePrice(BigDecimal.ZERO);
|
|
productService.save(product);
|
|
productService.save(product);
|
|
@@ -385,14 +414,14 @@ public class IndexController { ;
|
|
|
|
|
|
}
|
|
}
|
|
private void saveProductMG280(Long id) {
|
|
private void saveProductMG280(Long id) {
|
|
- String[] str = { "水中芙蓉", "水中芙蓉mini", "烈焰红唇", "烈焰红唇mini", "夏日爱恋", "夏日爱恋mini", "冰美人", "冰美人mini", "彩色精灵", "彩色精灵mini"};
|
|
|
|
|
|
+ String[] str = { "水中芙蓉-A05", "水中芙蓉mini-A31", "烈焰红唇-A06", "烈焰红唇mini-A32", "夏日爱恋-A11", "夏日爱恋mini-A33", "冰美人-A12", "冰美人mini-A34", "彩色精灵-A17", "彩色精灵mini-A35"};
|
|
|
|
|
|
for (int i = 0; i < str.length; i++) {
|
|
for (int i = 0; i < str.length; i++) {
|
|
TProduct product = new TProduct();
|
|
TProduct product = new TProduct();
|
|
- product.setCreateDate(new Date());
|
|
|
|
- product.setModifyDate(new Date());
|
|
|
|
product.setEquipmentId(id);
|
|
product.setEquipmentId(id);
|
|
- product.setProductName(str[i]);
|
|
|
|
|
|
+ String[] split = str[i].split("-");
|
|
|
|
+ product.setProductName(split[0]);
|
|
|
|
+ product.setNo(split[1]);
|
|
product.setRmbPrice(BigDecimal.ZERO);
|
|
product.setRmbPrice(BigDecimal.ZERO);
|
|
product.setCodePrice(BigDecimal.ZERO);
|
|
product.setCodePrice(BigDecimal.ZERO);
|
|
productService.save(product);
|
|
productService.save(product);
|
|
@@ -400,16 +429,17 @@ public class IndexController { ;
|
|
|
|
|
|
}
|
|
}
|
|
private void saveProductMG1(Long id) {
|
|
private void saveProductMG1(Long id) {
|
|
- String[] str = {"玫瑰精灵", "童心未泯", "五彩缤纷", "天雪恋舞", "水中芙蓉", "烈焰红唇", "美梦成真", "一见钟情", "幽兰爱恋", "心之守护",
|
|
|
|
- "夏日爱恋", "冰美人", "国色天香", "赤子之心", "海洋之心", "水晶之恋", "彩色精灵", "小棉袄", "精灵蝶梦","夏日倾城","百花齐放","蜂缠蝶恋","豆蔻年华","星空幻想"
|
|
|
|
- ,"坠入星空","雪花飞舞","春暖花开","花飞蝶舞","花样年华","心花怒放"};
|
|
|
|
|
|
+ String[] str = {"玫瑰精灵-A01", "童心未泯-A02", "五彩缤纷-A03", "天雪恋舞-A04", "水中芙蓉-A05", "烈焰红唇-A06", "美梦成真-A07", "一见钟情-A08", "幽兰爱恋-A09",
|
|
|
|
+ "心之守护-A10", "夏日爱恋-A11", "冰美人-A12", "国色天香-A13", "赤子之心-A14", "海洋之心-A15", "水晶之恋-A16", "彩色精灵-A17", "小棉袄-A18",
|
|
|
|
+ "精灵蝶梦-A19","夏日倾城-A20","百花齐放-A21","蜂缠蝶恋-A22","豆蔻年华-A23","星空幻想-A24","坠入星空-A25","雪花飞舞-A26","春暖花开-A27","花飞蝶舞-A28",
|
|
|
|
+ "花样年华-A29","心花怒放-A30"};
|
|
|
|
|
|
for (int i = 0; i < str.length; i++) {
|
|
for (int i = 0; i < str.length; i++) {
|
|
TProduct product = new TProduct();
|
|
TProduct product = new TProduct();
|
|
- product.setCreateDate(new Date());
|
|
|
|
- product.setModifyDate(new Date());
|
|
|
|
product.setEquipmentId(id);
|
|
product.setEquipmentId(id);
|
|
- product.setProductName(str[i]);
|
|
|
|
|
|
+ String[] split = str[i].split("-");
|
|
|
|
+ product.setProductName(split[0]);
|
|
|
|
+ product.setNo(split[1]);
|
|
product.setRmbPrice(BigDecimal.ZERO);
|
|
product.setRmbPrice(BigDecimal.ZERO);
|
|
product.setCodePrice(BigDecimal.ZERO);
|
|
product.setCodePrice(BigDecimal.ZERO);
|
|
productService.save(product);
|
|
productService.save(product);
|
|
@@ -417,29 +447,29 @@ public class IndexController { ;
|
|
|
|
|
|
}
|
|
}
|
|
private void saveProductMG12(Long id) {
|
|
private void saveProductMG12(Long id) {
|
|
- String[] str = { "精灵蝶梦","夏日倾城","百花齐放","蜂缠蝶恋","豆蔻年华","星空幻想"
|
|
|
|
- ,"坠入星空","雪花飞舞","春暖花开","花飞蝶舞","花样年华","心花怒放"};
|
|
|
|
|
|
+ String[] str = { "精灵蝶梦-A19","夏日倾城-A20","百花齐放-A21","蜂缠蝶恋-A22","豆蔻年华-A23","星空幻想-A24"
|
|
|
|
+ ,"坠入星空-A25","雪花飞舞-A26","春暖花开-A27","花飞蝶舞-A28","花样年华-A29","心花怒放-A30"};
|
|
for (int i = 0; i < str.length; i++) {
|
|
for (int i = 0; i < str.length; i++) {
|
|
TProduct product = new TProduct();
|
|
TProduct product = new TProduct();
|
|
- product.setCreateDate(new Date());
|
|
|
|
- product.setModifyDate(new Date());
|
|
|
|
product.setEquipmentId(id);
|
|
product.setEquipmentId(id);
|
|
- product.setProductName(str[i]);
|
|
|
|
|
|
+ String[] split = str[i].split("-");
|
|
|
|
+ product.setProductName(split[0]);
|
|
|
|
+ product.setNo(split[1]);
|
|
product.setRmbPrice(BigDecimal.ZERO);
|
|
product.setRmbPrice(BigDecimal.ZERO);
|
|
product.setCodePrice(BigDecimal.ZERO);
|
|
product.setCodePrice(BigDecimal.ZERO);
|
|
productService.save(product);
|
|
productService.save(product);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
private void saveProductMG22(Long id) {
|
|
private void saveProductMG22(Long id) {
|
|
- String[] str = {"玫瑰精灵", "童心未泯", "五彩缤纷", "天雪恋舞", "水中芙蓉", "烈焰红唇", "美梦成真", "一见钟情", "幽兰爱恋", "心之守护",
|
|
|
|
- "夏日爱恋", "冰美人", "国色天香", "赤子之心", "海洋之心", "水晶之恋", "彩色精灵", "小棉袄", "精灵蝶梦","蜂缠蝶恋","坠入星空","花飞蝶舞"};
|
|
|
|
|
|
+ String[] str = {"玫瑰精灵-A01", "童心未泯-A02", "五彩缤纷-A03", "天雪恋舞-A04", "水中芙蓉-A05", "烈焰红唇-A06", "美梦成真-A07", "一见钟情-A08", "幽兰爱恋-A09", "心之守护-A10",
|
|
|
|
+ "夏日爱恋-A11", "冰美人-A12", "国色天香-A13", "赤子之心-A14", "海洋之心-A15", "水晶之恋-A16", "彩色精灵-A17", "小棉袄-A18", "精灵蝶梦-A19","蜂缠蝶恋-A22","坠入星空-A25","花飞蝶舞-A28"};
|
|
|
|
|
|
for (int i = 0; i < str.length; i++) {
|
|
for (int i = 0; i < str.length; i++) {
|
|
TProduct product = new TProduct();
|
|
TProduct product = new TProduct();
|
|
- product.setCreateDate(new Date());
|
|
|
|
- product.setModifyDate(new Date());
|
|
|
|
product.setEquipmentId(id);
|
|
product.setEquipmentId(id);
|
|
- product.setProductName(str[i]);
|
|
|
|
|
|
+ String[] split = str[i].split("-");
|
|
|
|
+ product.setProductName(split[0]);
|
|
|
|
+ product.setNo(split[1]);
|
|
product.setRmbPrice(BigDecimal.ZERO);
|
|
product.setRmbPrice(BigDecimal.ZERO);
|
|
product.setCodePrice(BigDecimal.ZERO);
|
|
product.setCodePrice(BigDecimal.ZERO);
|
|
productService.save(product);
|
|
productService.save(product);
|
|
@@ -447,15 +477,15 @@ public class IndexController { ;
|
|
|
|
|
|
}
|
|
}
|
|
private void saveProductMG26(Long id) {
|
|
private void saveProductMG26(Long id) {
|
|
- String[] str = {"玫瑰精灵", "童心未泯", "五彩缤纷", "天雪恋舞", "水中芙蓉", "烈焰红唇", "美梦成真", "一见钟情", "幽兰爱恋", "心之守护",
|
|
|
|
- "夏日爱恋", "冰美人", "国色天香", "赤子之心", "海洋之心", "水晶之恋", "彩色精灵", "小棉袄", "精灵蝶梦","蜂缠蝶恋","坠入星空","花飞蝶舞",
|
|
|
|
- "夏日倾城", "雪花飞舞", "豆蔻年华", "花样年华"};
|
|
|
|
|
|
+ String[] str = {"玫瑰精灵-A01", "童心未泯-A02", "五彩缤纷-A03", "天雪恋舞-A04", "水中芙蓉-A05", "烈焰红唇-A06", "美梦成真-A07", "一见钟情-A08", "幽兰爱恋-A09", "心之守护-A10",
|
|
|
|
+ "夏日爱恋-A11", "冰美人-A12", "国色天香-A13", "赤子之心-A14", "海洋之心-A15", "水晶之恋-A16", "彩色精灵-A17", "小棉袄-A18", "精灵蝶梦-A19","蜂缠蝶恋-A22","坠入星空-A25","花飞蝶舞-A28",
|
|
|
|
+ "夏日倾城-A20", "雪花飞舞-A26", "豆蔻年华-A23", "花样年华-A29"};
|
|
for (int i = 0; i < str.length; i++) {
|
|
for (int i = 0; i < str.length; i++) {
|
|
TProduct product = new TProduct();
|
|
TProduct product = new TProduct();
|
|
- product.setCreateDate(new Date());
|
|
|
|
- product.setModifyDate(new Date());
|
|
|
|
product.setEquipmentId(id);
|
|
product.setEquipmentId(id);
|
|
- product.setProductName(str[i]);
|
|
|
|
|
|
+ String[] split = str[i].split("-");
|
|
|
|
+ product.setProductName(split[0]);
|
|
|
|
+ product.setNo(split[1]);
|
|
product.setRmbPrice(BigDecimal.ZERO);
|
|
product.setRmbPrice(BigDecimal.ZERO);
|
|
product.setCodePrice(BigDecimal.ZERO);
|
|
product.setCodePrice(BigDecimal.ZERO);
|
|
productService.save(product);
|
|
productService.save(product);
|
|
@@ -578,7 +608,7 @@ public class IndexController { ;
|
|
* @param clientId 个推
|
|
* @param clientId 个推
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- @RequestMapping(value = "/equimentArea", method = RequestMethod.GET)
|
|
|
|
|
|
+ @RequestMapping(value = "/equimentArea.htm", method = RequestMethod.GET)
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public JsonMessage equimentArea(String clientId, String longitude, String latitude, String fullName){
|
|
public JsonMessage equimentArea(String clientId, String longitude, String latitude, String fullName){
|
|
if(!StringUtils.isEmpty(longitude)&&!StringUtils.isEmpty(latitude)&&!StringUtils.isEmpty(fullName)){
|
|
if(!StringUtils.isEmpty(longitude)&&!StringUtils.isEmpty(latitude)&&!StringUtils.isEmpty(fullName)){
|
|
@@ -597,7 +627,7 @@ public class IndexController { ;
|
|
/**
|
|
/**
|
|
* 商品调价
|
|
* 商品调价
|
|
*/
|
|
*/
|
|
- @RequestMapping(value = "/updateProduct", method = RequestMethod.POST)
|
|
|
|
|
|
+ @RequestMapping(value = "/updateProduct.htm", method = RequestMethod.POST)
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public JsonMessage updateProduct(@RequestBody List<ProductVo> productVos) {
|
|
public JsonMessage updateProduct(@RequestBody List<ProductVo> productVos) {
|
|
Double f=0.00;
|
|
Double f=0.00;
|
|
@@ -655,7 +685,7 @@ public class IndexController { ;
|
|
* @return
|
|
* @return
|
|
* @Param pwd 密码内容
|
|
* @Param pwd 密码内容
|
|
*/
|
|
*/
|
|
- @RequestMapping(value = "/updatePwd", method = RequestMethod.POST)
|
|
|
|
|
|
+ @RequestMapping(value = "/updatePwd.htm", method = RequestMethod.POST)
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public JsonMessage updatePwd(String clientId, String pwdType, String pwd) {
|
|
public JsonMessage updatePwd(String clientId, String pwdType, String pwd) {
|
|
LambdaQueryWrapper<TEquipment> query = Wrappers.lambdaQuery();
|
|
LambdaQueryWrapper<TEquipment> query = Wrappers.lambdaQuery();
|
|
@@ -690,7 +720,7 @@ public class IndexController { ;
|
|
* 线上/线下
|
|
* 线上/线下
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- @RequestMapping(value = "/updatePayType", method = RequestMethod.POST)
|
|
|
|
|
|
+ @RequestMapping(value = "/updatePayType.htm", method = RequestMethod.POST)
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public JsonMessage updatePayType(String clientId, String payType) {
|
|
public JsonMessage updatePayType(String clientId, String payType) {
|
|
LambdaQueryWrapper<TEquipment> query = Wrappers.lambdaQuery();
|
|
LambdaQueryWrapper<TEquipment> query = Wrappers.lambdaQuery();
|
|
@@ -708,7 +738,7 @@ public class IndexController { ;
|
|
/**
|
|
/**
|
|
* 日志上传
|
|
* 日志上传
|
|
*/
|
|
*/
|
|
- @RequestMapping(value = "/sendLog", method = RequestMethod.POST)
|
|
|
|
|
|
+ @RequestMapping(value = "/sendLog.htm", method = RequestMethod.POST)
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public String uploadFile(HttpServletRequest request, HttpServletResponse response, String fileName) throws Exception{
|
|
public String uploadFile(HttpServletRequest request, HttpServletResponse response, String fileName) throws Exception{
|
|
// String fileName = request.getParameter("fileName");
|
|
// String fileName = request.getParameter("fileName");
|
|
@@ -984,7 +1014,7 @@ public class IndexController { ;
|
|
* @param productTotal
|
|
* @param productTotal
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- @RequestMapping(value = "/updateProductTotal", method = RequestMethod.POST)
|
|
|
|
|
|
+ @RequestMapping(value = "/updateProductTotal.htm", method = RequestMethod.POST)
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public JsonMessage updateProductTotal(String clientId, Integer productTotal) {
|
|
public JsonMessage updateProductTotal(String clientId, Integer productTotal) {
|
|
LambdaQueryWrapper<TEquipment> query = Wrappers.lambdaQuery();
|
|
LambdaQueryWrapper<TEquipment> query = Wrappers.lambdaQuery();
|
|
@@ -1245,5 +1275,28 @@ public class IndexController { ;
|
|
// return R.fail(ResponseCodesEnum.B0001,"你的错误信息");
|
|
// return R.fail(ResponseCodesEnum.B0001,"你的错误信息");
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ *是否启用物料监控功能
|
|
|
|
+ * 0:不启用,1:启用
|
|
|
|
+ * @param clientId 个推
|
|
|
|
+
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @RequestMapping(value = "/updateMaterialStatus.htm", method = RequestMethod.POST)
|
|
|
|
+ @ResponseBody
|
|
|
|
+ public JsonMessage updateMaterialUse(String clientId, String isMaterialUse){
|
|
|
|
+ if(!StringUtils.isEmpty(clientId)&&!StringUtils.isEmpty(isMaterialUse)){
|
|
|
|
+ LambdaQueryWrapper<TEquipment> query = Wrappers.lambdaQuery();
|
|
|
|
+ query.eq(TEquipment::getClientId,clientId);
|
|
|
|
+ List<TEquipment> list1 = equipmentService.list(query);
|
|
|
|
+ TEquipment equipment = list1.get(0);
|
|
|
|
+ TEquipmentDesc equipmentDesc = equipmentDescService.getById(equipment.getId());
|
|
|
|
+ equipmentDesc.setIsMaterialUse(isMaterialUse);
|
|
|
|
+ equipmentDescService.updateById(equipmentDesc);
|
|
|
|
+ return JsonMessage.success("success");
|
|
|
|
+ }
|
|
|
|
+ return JsonMessage.error("error");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|